tags:

views:

104

answers:

1

I have this below function and it works

(fn x => x * 2) 2; 

but for this below one, it is not working

(fn x y => x + y ) 2 3;

can anyone tell me why? or help give me some hint to get it to work.

+3  A: 

(fn x => fn y => x+y) 2 3; works. fn simply doesn't have the same syntactic sugar to define curried functions that fun has.

sepp2k