Flatten Array in Elixir
Take a nested list and return a single list with all values except nil/null
exercism fetch elixir flatten-array
Take a nested list and return a single flattened list with all values except nil/null.
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
Execute the tests with:
$ elixir flatten_array_test.exs
In the test suites, all but the first test have been skipped.
Once you get a test passing, you can unskip the next one by
commenting out the relevant
@tag :pending with a
Or, you can enable all the tests by commenting out the
ExUnit.configure line in the test suite.
# ExUnit.configure exclude: :pending, trace: true
For more detailed information about the Elixir track, please see the help page.
Interview Question https://reference.wolfram.com/language/ref/Flatten.html
Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.