3

This on compiling gives {ok,assignment5}.

 three_a(F) -> fun(Y) -> lists:foldl(F,0,Y).

After writing this

F1=assignment5:three_a(fun(X,Sum) -> X+Sum end).

Gives

** exception error: undefined function assignment5:three_a/1

Please help out!

Mishal Shah
  • 153
  • 2
  • 2
  • 10

1 Answers1

0

All funs (anonymous functions) start with fun(.) and end with end.1

2240
  • 1,547
  • 2
  • 12
  • 30