anko / eslisp

un-opinionated S-expression syntax and macro system for JavaScript
ISC License
528 stars 31 forks source link

(- 3 2 1) !== 3 - (2 - 1) #49

Closed iovdin closed 7 years ago

iovdin commented 7 years ago

I expect (- 3 2 1) to be translated to 3 - 2 - 1 which evaluates to 0 in javascript while 3 - (2 - 1) evaluates to 2

im to fix it

anko commented 7 years ago

What an embarrassing mistake. I forgot about associativity! Commit 2c48d06 should make the appropriate operators left-associative.

Should work as you expect in v0.7.5.