You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an if occurs in an argument list, it is evaluated before any proceeding arguments. I was expecting the arguments to be evaluated in order.
E.g. I expect the following to evaluate to (1 2), but it evaluates to (2 1) (here str is a placeholder for a function of two arguments and add represents something with side-effects).
(with r () (str (add r 1) (if true (add r 2))))
The text was updated successfully, but these errors were encountered:
Yes, you're absolutely right. I've dealt with this behavior in other projects but haven't updated Lumen. Perhaps @shawwn has (or has had) a patch for this?
Note that this isn't affecting me at the moment (that I know of), it's just an edge case that came to mind while thinking about implementing my own lisp on top of javascript. (I've managed to tweak lumen to my liking, just thought it'd be fun to write my own.)
When an
if
occurs in an argument list, it is evaluated before any proceeding arguments. I was expecting the arguments to be evaluated in order.E.g. I expect the following to evaluate to
(1 2)
, but it evaluates to(2 1)
(herestr
is a placeholder for a function of two arguments andadd
represents something with side-effects).The text was updated successfully, but these errors were encountered: