Pass a function as a first argument in a function call in coffeescript

Viewed 7110

In the following code

x= (f,n) -> f(n)
...
x( (n) -> n+1 , 5) #parse error

How can I fix the parse error above ?

Thanks

3 Answers
Related