Merge pull request #208 from mkwiatkowski/master
Use more succinct syntax for mapping with String.capitalize
This commit is contained in:
@@ -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 == ___
|
||||
|
||||
Reference in New Issue
Block a user