Skip to content

Instantly share code, notes, and snippets.

@Vagabond
Created April 12, 2011 13:02
Show Gist options
  • Save Vagabond/915459 to your computer and use it in GitHub Desktop.
Save Vagabond/915459 to your computer and use it in GitHub Desktop.
-module(assignment).
-export([print/1]).
print(List) ->
PrintList = fun({CN, IN, CT, CC, CE, RN}) ->
io:format("~p ~p ~p ~p ~p ~p~n", [CN, IN, CT, CC, CE, RN])
end,
list:foreach(PrintList, List).
printList(L) ->
Print = fun(X) ->
io:format("~p~n", [X])
end,
list:foreach(Print, L).
[{comp1, kin, tr, 1800, 30, 8, 208},
{comp2, lee, mw, 1100, 25, 14, 408}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment