Skip to content

Instantly share code, notes, and snippets.

@kevsmith
Created March 22, 2011 17:35
Show Gist options
  • Select an option

  • Save kevsmith/881645 to your computer and use it in GitHub Desktop.

Select an option

Save kevsmith/881645 to your computer and use it in GitHub Desktop.
smerl makes me giggle
Mod = smerl:new(maths),
{ok, Mod1} = smerl:add_func(Mod, "add(X, Y) -> X + Y."),
smerl:compile(Mod1),
5 = maths:add(2, 3),
{ok, Mod2} = smerl:add_func(Mod1, "mult(X, Y) -> X * Y."),
smerl:compile(Mod2),
5 = maths:add(2, 3),
42 = maths:mult(6, 7).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment