diff options
author | Martin Schimandl <martin.schimandl@gmail.com> | 2015-10-24 07:28:36 +0200 |
---|---|---|
committer | Martin Schimandl <martin.schimandl@gmail.com> | 2015-10-24 07:28:36 +0200 |
commit | 28f71ffcccc6d69d4eb6fc2de0f384fe708362f5 (patch) | |
tree | 824a79dba743213cef1297a870c97c88e61b6c63 /haskell.html.markdown | |
parent | 543f10b5626a600b27f5fb70212720a17a4f190e (diff) | |
parent | ab67a8f4c29309d7fd5e0b1bd3255fe695beb8cf (diff) |
Merge remote-tracking branch 'adambard/master'
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 |