[erlang-questions] One sample program want to know how it works

Daniel Luna <>
Fri May 16 16:25:38 CEST 2008


On Fri, 16 May 2008, sham wrote:
> -module(xXx).
> -export([x/1]).
>
> -define(x,x(.
> -define(Xx,X.
> -define(X,X)
> ->. ?x?X?Xx.
> This is the program.I want to know how it works.
> Please anyone help me.

Quite simple really... :-)

It's good to know that macro defines end in a . and that the 
endparenthesis is optional.

/Luna
-- 
Daniel Luna                           | Top reasons that I have a beard:
                     |  a) Laziness.
http://www.update.uu.se/~luna/        |  b) I can.
Don't look at my homepage (it stinks).|  c) I can get away with it.



More information about the erlang-questions mailing list