Skip to content

Commit 0285509

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 7fc167d + dfbe6d9 commit 0285509

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

langs/outlaw/utils.rkt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@
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)

www/assignments/2.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

66
The goal of this assignment is to gain practice programming in Racket.
77

www/defns.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
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")

0 commit comments

Comments
 (0)