I am quiet new to Elixir programming and stuck badly at splitting into two elements tuple.
Given a list of integers, return a two element tuple. The first element is
Or you can use the Erlang :lists module:
:lists
iex> :lists.partition(fn (n) -> rem(n, 2) == 1 end, [1,2,3,4,5]) {[1,3,5],[2,4]}