MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1j1cw7/coffeescripts_scoping_is_madness/cbalcra/?context=3
r/programming • u/donatj • Jul 25 '13
315 comments sorted by
View all comments
Show parent comment
1
The thing I sometimes run into in CS is that defining a lambda as the first argument of a function when there are more than one argument does only work if you put the thing in brackets:
foo((->), bar)
1 u/jmhnilbog Aug 01 '13 What's wrong with:foo (x)-> console.log 'x' , barI'm assuming your lambda would have some content. Without any, this won't work. 1 u/[deleted] Aug 01 '13 I didn't know that that works. Thanks.
What's wrong with:
foo (x)-> console.log 'x' , bar
I'm assuming your lambda would have some content. Without any, this won't work.
1 u/[deleted] Aug 01 '13 I didn't know that that works. Thanks.
I didn't know that that works. Thanks.
View all comments
Show parent comment
1
u/[deleted] Jul 26 '13
The thing I sometimes run into in CS is that defining a lambda as the first argument of a function when there are more than one argument does only work if you put the thing in brackets:
foo((->), bar)