Created
December 7, 2017 16:20
-
-
Save tene/f73df7979a0bc7a87a4807cc784a3fa6 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
[tene@vrici ~]$ ghci | |
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help | |
Prelude> :t foldl | |
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b | |
Prelude> let x = [(+2),(+3),(+4)] | |
Prelude> :t x | |
x :: Num a => [a -> a] | |
Prelude> :t ($) | |
($) :: (a -> b) -> a -> b | |
Prelude> :t flip ($) | |
flip ($) :: a -> (a -> c) -> c | |
Prelude> :t foldl (flip ($)) | |
foldl (flip ($)) :: Foldable t => a -> t (a -> a) -> a | |
Prelude> :t foldl (flip ($)) 0 x | |
foldl (flip ($)) 0 x :: Num a => a | |
Prelude> foldl (flip ($)) 0 x | |
9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment