erlang Result = nth0(2, List),
-module(listnth).
-export([start/0]).
start() ->
List = [one, two, three, four, five],
Result = nth0(2, List),
io:format("~w~n", [Result]).
nth0(N, List) -> nth0(N, List, 0).
nth0(N, [H|_], N) -> H;
nth0(N, [_|T], Acc) -> nth0(N, T, Acc + 1).