diff options
author | Claudson Martins <claudson@outlook.com> | 2015-10-25 20:06:41 -0300 |
---|---|---|
committer | Claudson Martins <claudson@outlook.com> | 2015-10-25 20:06:41 -0300 |
commit | 71a19df2cebf1fdf46c54a500de623d821cf363b (patch) | |
tree | faca9e30328733081efc158f587a809daa6feaff /haskell.html.markdown | |
parent | 27327822eb05cf1835afa2ef4365b8b4fe98b908 (diff) | |
parent | 44ca091c73afe13ec8760021cfed1d77afc5e4a5 (diff) |
Merge remote-tracking branch 'refs/remotes/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 |