commit 16b1930f4efed45f0a108ef1163bdc6f67ee4aa4 parent f8f6339949cee35f03251d899786a85c7f5cc724 Author: Ed van Bruggen <edvb@uw.edu> Date: Sun, 6 Oct 2019 22:39:28 -0700 Allow let and recur multi expression bodies Diffstat:
tibs/lib.tsp | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tibs/lib.tsp b/tibs/lib.tsp @@ -63,11 +63,11 @@ (macro (con . body) (list 'cond (list con (void)) (list t (cons 'do body))))) (define let - (macro (vars body) - (cons (list 'lambda (map car vars) body) (map cadr vars)))) + (macro (vars . body) + (cons (list* 'lambda (map car vars) body) (map cadr vars)))) (define recur - (macro (fn vars body) - (cons (list 'lambda (cons fn (map car vars)) body) (cons (list 'lambda (map car vars) body) (map cadr vars))))) + (macro (fn vars . body) + (cons (list* 'lambda (cons fn (map car vars)) body) (cons (list* 'lambda (map car vars) body) (map cadr vars))))) ;;; Logic (define (not x)