summaryrefslogtreecommitdiffhomepage
path: root/haskell.html.markdown
diff options
context:
space:
mode:
authorAdam <adam@adambard.com>2015-10-19 14:28:03 +0800
committerAdam <adam@adambard.com>2015-10-19 14:28:03 +0800
commite6573af645792cb434a16440f60cce8935fea95c (patch)
treea3ac540a41f977dcbda046c8faa332cd8864f2b3 /haskell.html.markdown
parent6af01029e450fd2f82f0d056806ccb63a6e48ec9 (diff)
parentba5f3ebc112b52797a9a21fdbba1846885feac2c (diff)
Merge branch 'master' of github.com:adambard/learnxinyminutes-docs
Diffstat (limited to 'haskell.html.markdown')
-rw-r--r--haskell.html.markdown11
1 files changed, 6 insertions, 5 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index f28fcfe7..369b1b20 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -209,14 +209,15 @@ foo 5 -- 75
-- the expression on its right is applied as the parameter to the function on its left.
-- before
-(even (fib 7)) -- false
-
--- after
-even . fib $ 7 -- false
+even (fib 7) -- false
-- equivalently
even $ fib 7 -- false
+-- composing functions
+even . fib $ 7 -- false
+
+
----------------------------------------------------
-- 5. Type signatures
----------------------------------------------------
@@ -282,7 +283,7 @@ foldl (\x y -> 2*x + y) 4 [1,2,3] -- 43
foldr (\x y -> 2*x + y) 4 [1,2,3] -- 16
-- This is now the same as
-(2 * 3 + (2 * 2 + (2 * 1 + 4)))
+(2 * 1 + (2 * 2 + (2 * 3 + 4)))
----------------------------------------------------
-- 7. Data Types