Elixir 練習問題 ListsAndRecursion-6

flattenn

^o^ > iex practice_10_2.exs
Eshell V8.0  (abort with ^G)
Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> MyList.flatten([1, [2, 3, [4] ], 5, [[[6]]]])
[1, 2, 3, 4, 5, 6]