Created
October 24, 2018 12:00
-
-
Save jordanhudgens/2c547d3c24e3a95a3cfbbf9e07429c13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Titleize do | |
def render(words) do | |
String.split(words) | |
|> Enum.map(fn word -> String.capitalize(word) end) | |
|> Enum.join(" ") | |
end | |
end | |
Titleize.render("how to learn elixir") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment