Question about lists:foldl()

Stéphane Leibovitsch stephane.leibovitsch@REDACTED
Thu Nov 9 16:35:17 CET 2000


Hello everybody,

I have a little problem with the function lists:foldl() or
lists:foldr().

When I try this, I get an error message, but I don't understand why :

1> lists:foldl( fun (x,y)->x+y end,2 ,[3,4,5]).

** exited: {function_clause,[{erl_eval,'-inside-a-shell-fun-',[3,2]},
                             {erl_eval,expr,3}]} **

Do you have an idea ?

Thanks,

	Stéphane Leibovitsch

-- 
Stéphane Leibovitsch
stephane.leibovitsch@REDACTED



More information about the erlang-questions mailing list