Closed ghost closed 2 years ago
Fixed! Thanks for the report 🙂
The new version has also been published to crates.io
Hi
Other lisps actually also support 0 args for and
and or
:
Scheme:
> (and)
#t
> (or)
#f
>
Common Lisp:
* (and)
T
* (or)
NIL
*
Clojure:
user=> (and)
true
user=> (or)
nil
user=>
ClojureScript:
(and)
true
(or)
nil
cljs.user=>
With rust_lisp 0.15.1, adapting the example from the README:
The above, evaluating
(or Nil Nil T)
, prints "F". Similarly, evaluating(and T T Nil)
prints "T".I don't know much about Lisp, and I'm not sure about what the reference implementation should be, but at least in Common Lisp, both
and
andor
support a single argument, while in rust_lisp, this results in an error.I'd be happy to have a go at generalising
and
andor
and submitting a pull request.