diff options
author | Per Lilja <perlilja@gmail.com> | 2015-10-21 13:28:36 +0200 |
---|---|---|
committer | Per Lilja <perlilja@gmail.com> | 2015-10-21 13:28:36 +0200 |
commit | 3f8b067a0cace44bb43bdd08561b0efc747fb26c (patch) | |
tree | 1e17c3f1968f7b2f97ea9f84ca0098224ff60786 /haskell.html.markdown | |
parent | d1a822f96c88855b2cbb649a4ea7b452e4104164 (diff) | |
parent | ef6973b13f50063462d28a96ac57e93aed40844c (diff) |
Merge pull request #1 from adambard/master
Update fork
Diffstat (limited to 'haskell.html.markdown')
-rw-r--r-- | haskell.html.markdown | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown index 369b1b20..08611e63 100644 --- a/haskell.html.markdown +++ b/haskell.html.markdown @@ -195,11 +195,11 @@ foo 5 -- 15 -- function composition -- the (.) function chains functions together. -- For example, here foo is a function that takes a value. It adds 10 to it, --- multiplies the result of that by 5, and then returns the final value. -foo = (*5) . (+10) +-- multiplies the result of that by 4, and then returns the final value. +foo = (*4) . (+10) --- (5 + 10) * 5 = 75 -foo 5 -- 75 +-- (5 + 10) * 4 = 60 +foo 5 -- 60 -- fixing precedence -- Haskell has another operator called `$`. This operator applies a function |