Created
March 17, 2019 21:20
-
-
Save dmwit/18f199735123728bd40525eebc5d65a7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
\xs -> sum $ map (sum . toDigits) xs | |
= { f $ x = f x } | |
\xs -> sum (map (sum . toDigits) xs) | |
= { function application associates to the left } | |
\xs -> sum ((map (sum . toDigits)) xs) | |
= { (f . g) x = f (g x), with f = sum, g = (map (sum . toDigits)) } | |
\xs -> (sum . (map (sum . toDigits))) xs | |
= { eta reduction } | |
(sum . (map (sum . toDigits))) | |
= { remove unnecessary clarifying parentheses } | |
sum . map (sum . toDigits) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment