You can run the tests with elixir flatten_test.exs
:
$ elixir flatten_test.exs
FlattenTest
* test nested array 2 (0.00ms)
* test empty array (0.00ms)
* test nested array 3 (0.00ms)
* test nested array 1 (0.00ms)
* test one element (0.00ms)
* test non-nested array (0.00ms)
* test nested array 4 (0.00ms)
Finished in 0.04 seconds (0.04s on load, 0.00s on tests)
7 tests, 0 failures
Randomized with seed 969009
Works like charm! Thanks for sharing it.