Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 7 lines (5 sloc) 201 Bytes
#!/usr/bin/escript
head([]) -> throw( error);
head([Element | _Tail]) -> Element.
main(_) -> io:format("Head of [1]: ~p~n", [head([1])]),
io:format("Head of [1, 2]: ~p~n", [head([1, 2])]).