You are viewing a single comment's thread. Return to all comments →
Elixir solution:
Hi adrielradicchi, this is my solution using your main function
defmodule Solution do def elements([head|tail]) do Enum.each(tail, fn x -> Enum.each(1..head, fn _ -> IO.puts(x) end) end) end def main() do IO.read(:stdio, :all) |> String.split |> Enum.map(&String.to_integer(&1)) |> elements end end Solution.main
Seems like cookies are disabled on this browser, please enable them to open this website
List Replication
You are viewing a single comment's thread. Return to all comments →
Elixir solution:
Hi adrielradicchi, this is my solution using your main function