Smerl breakthough: metacurrying

Yariv Sadan <>
Sat Aug 19 15:00:39 CEST 2006


Hi,

I added a new capability to Smerl, allowing you to curry parameters
for function forms in runtime, finally freeing us from having to know
the Erlang abstract form!

Quick example:

C1 = smerl:new(foo),
{ok, C2} = smerl:add_func(C1, "add(A,B) -> A+B.").
{ok, C3} = smerl:curry_add(C1, add, 2, 5),
{ok, C4} = smerl:curry_add(C3, add, 2, [3,2]),
smerl:compile(C4),
7 = smerl:add(6,1),
8 = smerl:add(3),
5 = smerl:add().

Get the latest verion of smerl at http://yarivsblog.com/files/smerl.erl

The full story is here

http://yarivsblog.com/articles/2006/08/19/erlang-metaprogramming-breakthrough-metacurrying

Enjoy!

Yariv



More information about the erlang-questions mailing list