Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9c1add1d98
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (15 sloc) 0.44 kb
%% This module will be correctly compiled
%% since fac(5) *is* 120
%% Now go and look at example3.erl2
defMods mod2 end.
addMod mod2.
defExports fac/1 end.
def fac = fun(0) -> 1; (N) -> N*fac(N-1) end.
120 = fac(5).
addMod mod2.
io:format("mod2:fac(50)=~p~n",[mod2:fac(50)]).
%% sample output
%% ./erl2 example2.erl2
%% mod2:fac(50)=30414093201713378043612608166064768844377641568960512000000000000
%% Created:"all.gen"
%% Success
Jump to Line
Something went wrong with that request. Please try again.