File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010(define (symbol->data-label s)
1111 (to-label "data_ " s))
1212
13+ ;; Char -> String
14+ (define (char-encode c)
15+ (if (or (char<=? #\a c #\z )
16+ (char<=? #\A c #\Z )
17+ (char<=? #\0 c #\9 )
18+ (memq c '(#\_ #; #\$ #\# #\@ #\~ #\. #\? )))
19+ (make-string 1 c)
20+ (string-append "$ " (number->string (char->integer c) 16 ))))
21+
1322(define (to-label prefix s)
1423 (string->symbol
15- (string-append
16- prefix
17- (apply string-append
18- (map (λ (c)
19- (if (or (char<=? #\a c #\z )
20- (char<=? #\A c #\Z )
21- (char<=? #\0 c #\9 )
22- (memq c '(#\_ #; #\$ #\# #\@ #\~ #\. #\? )))
23- (make-string 1 c)
24- (string-append "$ " (number->string (char->integer c) 16 ))))
25- (string->list (symbol->string s)))))))
24+ (string-append prefix
25+ (apply string-append
26+ (map char-encode
27+ (string->list (symbol->string s)))))))
2628
2729;; Id CEnv -> [Maybe Integer]
2830(define (lookup x cenv)
Original file line number Diff line number Diff line change 11#lang scribble/manual
22@title[#:tag "Assignment 2 " #:style 'unnumbered ]{Assignment 2: Racket Primer}
33
4- @bold{Due: Tuesday, September 14 , 11:59PM}
4+ @bold{Due: Thursday, February 10 , 11:59PM}
55
66The goal of this assignment is to gain practice programming in Racket.
77
Original file line number Diff line number Diff line change 2323
2424(define staff
2525 (list (list "Maniktala Dhruv " "dmanikt@umd.edu " "M/Tu 15:30-16:30 AVW 4160 " )
26- (list "Benjamin Glover Quiring " "bquiring@umd.edu " "W 14:00-16:00 AVW 4160 " )
26+ (list "Benjamin Glover Quiring " "bquiring@umd.edu " "W 16:30-18:30 AVW 4160 " )
2727 (list "William Chung " "wchung1@terpmail.umd.edu " "Thu 14:00-16:00 AVW 4160 " )))
2828
2929(define lecture-schedule "Tuesday & Thursday, 9:30am - 10:45pm, IRB 0318 " )
You can’t perform that action at this time.
0 commit comments