Skip to content

Instantly share code, notes, and snippets.

View franckstifler's full-sized avatar

Tchowa Franck A. franckstifler

View GitHub Profile
defmodule Lister do
def flatten([head | tail]) do
flatten(head) ++ flatten(tail)
end
def flatten([]), do: []
def flatten(head), do: [head]
end