Skip to content

Instantly share code, notes, and snippets.

@darinwilson
Created January 17, 2016 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darinwilson/229010e0da0e4f292628 to your computer and use it in GitHub Desktop.
Save darinwilson/229010e0da0e4f292628 to your computer and use it in GitHub Desktop.
LearnElixir.tv Episode 8 Exercise
def join(strs, separator) do
last = List.last(strs)
for str <- strs, into: "" do
if str != last do
str <> separator
else
str
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment