Is there a slick way to interleave a list of elements?

What i am trying to achieve is:

[“foo”,“bar”,“baz”,“qux”]

become [“foo”,"#", “bar”, “#”, “baz”, “#”, “qux”]

Is there a slick way to achieve this in Elixir?

1 Like

Is Enum.intersperse/2 suitable?

5 Likes

That is it! Thank you.