1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

Explicitly test for undefined arguments to handle false values like 0

This commit is contained in:
Ian Price 2015-06-24 19:57:28 +01:00
parent b631576f13
commit 89029a54f4
3 changed files with 52 additions and 8 deletions

View file

@ -40,7 +40,15 @@
(flatten-block else)))
(($ call function args)
(make-call (flatten-exp function)
(map flatten-exp args)))))
(map flatten-exp args)))
(($ ternary test then else)
(make-ternary (flatten-exp test)
(flatten-exp then)
(flatten-exp else)))
(($ prefix op exp)
(make-prefix op (flatten-exp exp)))
))
(define (maybe-make-block exp)
(match exp
((exp) exp)