Here's what I've got so far:
defmodule Triple do def triple_trouble(one, two, three) do first = String.graphemes one second = String.graphemes two third = String.graphemes three List.foldl(first, [], fn char, acc -> [char <> Enum.at(second, 0) <> Enum.at(third, 0)] ++ acc end) end end
I need to make an expression out of Enum.at(second, 0) so it actually gives the right index. Don't know how to do that yet.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here's what I've got so far:
I need to make an expression out of Enum.at(second, 0) so it actually gives the right index. Don't know how to do that yet.