gregspurrier / shen-ruby

ShenRuby is a port of the Shen programming language to Ruby
Other
76 stars 7 forks source link

The 'or' and 'and' functions should support partial application #4

Closed gregspurrier closed 11 years ago

gregspurrier commented 11 years ago

The or and and functions should support partial application. When partially applied, they move into the realm of normal functions and no longer short-circuit their evaluation.

This is the behavior in the SBCL port:

(0-) ((or) true (do (print "evaluated") true))
"evaluated"true

This the is current, erroneous behavior in ShenRuby:

(0-) ((or) true (do (print "evaluated") true))
or expects 2 arguments but was given 0