[erlang-questions] Calling external modules from a fun
Alessandro Sivieri
alessandro.sivieri@REDACTED
Wed Apr 28 23:01:42 CEST 2010
2010/4/28 Robert Virding <rvirding@REDACTED>
> Of course if you are going to be doing a lot of sending of source code
> to be evaluated on a remote machine then it would be easier and
> shorter to use LFE. The equivalent to the above in vanilla erlang is:
>
> Expr = [':',io,format,[quote,"~p~n"],[list,[':',erlang,nodes]]],
> rpc:call(Node2, lfe_eval, expr, [Expr]).
>
> Doing it all in LFE if course even nicer:
>
> (let ((e '(: io format '"~p~n" (list (: erlang nodes)))))
> (: rpc call node 'lfe_eval 'expr (list e)))
>
>
Well, this goes a little beyond my functional languages knowledge... :)
--
Sivieri Alessandro
alessandro.sivieri@REDACTED
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
More information about the erlang-questions
mailing list