More point-free notation

This commit is contained in:
Justin Leitgeb 2014-03-08 13:12:32 -05:00
parent 5a8c7377fa
commit b56b262c6c

View File

@ -10,7 +10,7 @@ import Data.Char (toUpper)
humanize
:: [Word] -- ^ List of Words, first of which will be capitalized
-> String -- ^ The humanized output
humanize s = intercalate " " $ map caseForWord $ isFirstList s
humanize = intercalate " " . map caseForWord . isFirstList
-- |Returns list with Bool indicating if an element is first.
isFirstList :: [a] -> [(a, Bool)]