From 586e5ca0b1106575c51fe77a671976c51d04cb07 Mon Sep 17 00:00:00 2001 From: Michal Kwiatkowski Date: Fri, 27 Oct 2017 09:01:36 +0200 Subject: [PATCH] Use more succinct syntax for mapping with String.capitalize. --- lib/koans/13_functions.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/koans/13_functions.ex b/lib/koans/13_functions.ex index ba04144..e362d1d 100644 --- a/lib/koans/13_functions.ex +++ b/lib/koans/13_functions.ex @@ -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 == ___