We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I decided I didn't want to use the Enum library at all and implemented my Elixir solution using pure naive comprehensions. One of the interesting things about recursion is that the list is represented backwards in memory immediately after make_list is run, but since filter walks the list again and places the last element in the first position, everything comes back out in the correct order once it is time to print :D
Filter Array
You are viewing a single comment's thread. Return to all comments →
I decided I didn't want to use the
Enum
library at all and implemented my Elixir solution using pure naive comprehensions. One of the interesting things about recursion is that the list is represented backwards in memory immediately aftermake_list
is run, but sincefilter
walks the list again and places the last element in the first position, everything comes back out in the correct order once it is time toprint
:D