Skip to content

Commit

Permalink
fix compsing functions, fixes #702
Browse files Browse the repository at this point in the history
  • Loading branch information
gkz committed Apr 9, 2015
1 parent 7c473dd commit 5fab25a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ast.ls
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ class exports.Binary extends Node
op = @op
functions = [@first]
x = @second
while x instanceof Binary and x.op is op
while x instanceof Binary and x.op is op and not x.partial
functions.push x.first
x = x.second
functions.push x
Expand Down
3 changes: 3 additions & 0 deletions test/function.ls
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ do ->
a = -> 100
eq 2, c!

f = ((x) -> (* x)) >> ((+ 1) >>)
eq 10 (f 2) 4

### infix calls
add = (x, y) --> x + y
times = (x, y) --> x * y
Expand Down

0 comments on commit 5fab25a

Please sign in to comment.