olleicua / hcl

Hot Cocoa Lisp
GNU General Public License v3.0
34 stars 4 forks source link

issue with chained comparisons #33

Open olleicua opened 9 years ago

olleicua commented 9 years ago
hcl> (< 1 2 3)
js: ((1 < 2) && (2 < 3));
true
hcl> (< 1 (+ 2 3) 3)
js: ((1 < (2 + 3)) && ((2 + 3) < 3));
false

Should use a reference in case the nested expression has side effects or performance implications.