Skip to content

Instantly share code, notes, and snippets.

@jcf
Created June 12, 2009 13:24
Show Gist options
  • Select an option

  • Save jcf/128632 to your computer and use it in GitHub Desktop.

Select an option

Save jcf/128632 to your computer and use it in GitHub Desktop.
-module(list_length).
-export([list_length/1]).
list_length([]) ->
0;
list_length([First | Rest]) ->
1 + list_length(Rest).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment