Merge pull request #208 from mkwiatkowski/master

Use more succinct syntax for mapping with String.capitalize
This commit is contained in:
Felipe Seré
2017-10-27 10:36:39 +01:00
committed by GitHub

View File

@@ -92,7 +92,7 @@ defmodule Functions do
koan "The result of a function can be piped into another function as its first argument" do
result = "full-name"
|> String.split("-")
|> Enum.map(&(String.capitalize(&1)))
|> Enum.map(&String.capitalize/1)
|> Enum.join(" ")
assert result == ___