newbie q.

Kurt <>
Thu Apr 13 02:05:56 CEST 2000

Greetings all.
Given this:
adder = fun(X) -> fun(Y) -> X + Y end end.

I can do this : 
Adder3 = adder(3).
and Adder3(10) returns 13.

However I can also do this: 
AdderX = adder(Adder3).

So, how can I call AdderX ? Is it possible? 
When I do AdderX(5), is this trying to do: Adder3 + 5
which is an error, but is syntactically correct?
Or have I got so used to pedantic type checking that I
don't even realise when I'm being lazy anymore?

Also, if `->' is `returns' (is it?), 
what does the '=' in the declaration mean?


More information about the erlang-questions mailing list