Skip to content

Instantly share code, notes, and snippets.

@susilolab
Created September 26, 2019 17:41
Show Gist options
  • Select an option

  • Save susilolab/24c9f59cee6d5fb1b7941b8bfb67b78c to your computer and use it in GitHub Desktop.

Select an option

Save susilolab/24c9f59cee6d5fb1b7941b8bfb67b78c to your computer and use it in GitHub Desktop.
Looping array/list di erlang
% hello world program
main(_Args) ->
L = [1,2,3,4,5],
% Function = fun(Elem) -> io:fwrite(Elem) end,
lists:foreach(fun(Elem) -> io:fwrite("~p~n", [Elem]) end, L).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment