[erlang-questions] Variables and side-effects

Michael Turner michael.eugene.turner@REDACTED
Sun Dec 30 14:11:18 CET 2012


On Sun, Dec 30, 2012 at 8:16 PM, Tyron Zerafa <tyron.zerafa@REDACTED> wrote:
> I have been reading about Erlang and I am finding a problem grasping the
> meaning of some terms related to variables.
>
> What do global, free and unbound variables stand for in Erlang? Do they mean
> the same thing?
>
> Is there a notion of global/free/unbound variables in Erlang? For instance,
> can I somehow implement this lambda:  λy -> x+y+1 ?

If you store a value in the process dictionary, you have a kind of
process-specific "global" x.

  http://www.erlang.org/course/advanced.html#dict

So yes, you can side effects.

Regards,
Michael Turner
Project Persephone
1-25-33 Takadanobaba
Shinjuku-ku Tokyo 169-0075
(+81) 90-5203-8682
turner@REDACTED
http://www.projectpersephone.org/

"Love does not consist in gazing at each other, but in looking outward
together in the same direction." -- Antoine de Saint-Exupéry



More information about the erlang-questions mailing list