Unified · Split
| @@ -49,9 +49,8 @@ · 48 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | ;; dispatch macro rune with read-list-until and a macro rune |
| 51 | 51 | #.(begin |
| 52 | − (def (to-list s r) | |
| 53 | − (map eval (read-list-until ">>" s))) | |
| 54 | − (set-dispatch-macro-rune #\< #\< to-list) | |
| 55 | − (def s (buffer "<<€1 €2 €3>> 1 2")) | |
| 56 | − (assert (equal? (read s) '((eur . 1) (eur . 2) (eur . 3)))) | |
| 52 | + (set-dispatch-macro-rune #\< #\< | |
| 53 | + (λ (s r) `(list ,@(read-list-until ">>" s)))) | |
| 54 | + (def s (buffer "<<€1 €2 €3>>1 2")) | |
| 55 | + (assert (equal? (eval (read s)) '((eur . 1) (eur . 2) (eur . 3)))) | |
| 57 | 56 | (assert (equal? (read s) 1))) |