1 2 3 4 5 6 7 8 9 10 | 42+3i 1/3 0.333 #b101010 #x2a #o52 "hello world" #\h #true #t #false ; yes, we have no falsiness #f 'sym (void) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | (for/list ([i (in-range 1 5)] [j (in-naturals 6)]) (list i j)) (for/fold ([sum 0]) ([i (in-range 1 5)] [j (in-naturals 6)]) (+ sum i j)) (for/sum ([i (in-range 1 5)] [j (in-naturals 6)]) (+ i j)) (apply + (apply append (for/list ([i (in-range 1 5)] [j (in-naturals 6)]) (list i j)))) |
1 2 3 4 5 6 7 8 9 10 11 12 13 | (define-macro (dbl ARG) #'(list ARG ARG)) (define-macro-cases foo [(_ 42) #'"kaboom!"] [(_ ARG) #'(list ARG ARG)]) (define-macro (rev ARG0 "foo" ARG ...) #'(append (reverse (list 'ARG ...)) (list 'ARG0))) (define-macro (tell ARG ...) #'(for ([name (in-list (list 'ARG ...))]) (displayln (format "~a = ~a" name ARG)) ...)) |