Skip to content

Instantly share code, notes, and snippets.

@varnerac
Created September 15, 2015 18:18
Show Gist options
  • Save varnerac/c78ce7bae5b7fc6b0304 to your computer and use it in GitHub Desktop.
Save varnerac/c78ce7bae5b7fc6b0304 to your computer and use it in GitHub Desktop.
-module(mailinglist).
-export([test/0]).
handle([Head | _] = _List) when is_list(Head) ->
list_of_lists;
handle(_List) ->
not_a_list_of_lists.
test() ->
list_of_lists = handle([[1,2,3], [a, b, c]]),
not_a_list_of_lists = handle([a, {silly, true}]),
ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment