v6.3-exception
Matthew Butterick 7 years ago
parent f4cbcc0ac5
commit 26f79d4776

@ -5,15 +5,15 @@
(define (tokenize ip) (define (tokenize ip)
(for/list ([tok (in-port read-char ip)]) (for/list ([tok (in-port read-char ip)])
tok)) tok))
(define (parse toks) (define (parse toks)
(for/list ([tok (in-list toks)]) (for/list ([tok (in-list toks)])
(define int (modulo (char->integer tok) 128)) (define int (modulo (char->integer tok) 128))
(for/list ([bit (in-range 7)]) (for/list ([bit (in-range 7)])
(if (bitwise-bit-set? int bit) (if (bitwise-bit-set? int bit)
'taco 'taco
null)))) null))))
(define (read-syntax src ip) (define (read-syntax src ip)
(define toks (tokenize ip)) (define toks (tokenize ip))

Loading…
Cancel
Save