tuturto / apocrita

A very simple lisp, implemented in hy
MIT License
4 stars 0 forks source link

lazy evaluation #8

Open tuturto opened 8 years ago

tuturto commented 8 years ago

language could be lazy, so parameters are evaluated at some point before their value is needed and not when being passed to a function:

=> (define error
...  (lambda ()
...    (foo bar baz)))
<closure>

=> (define test
...  (lambda (flag value)
...    (cond (flag value)
...          (#t #t))))
<closure>

=> (test #f (error))
#t