mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Haskell.html.markdown. Wrong result of an expression.
The seventh Fibonacci number is 13 (odd number), so the result of 'even 13' is false.
This commit is contained in:
parent
adb92e5263
commit
9fb21f1ce4
@ -208,13 +208,13 @@ foo 5 -- 75
|
||||
-- to get rid of a lot of parentheses:
|
||||
|
||||
-- before
|
||||
(even (fib 7)) -- true
|
||||
(even (fib 7)) -- false
|
||||
|
||||
-- after
|
||||
even . fib $ 7 -- true
|
||||
even . fib $ 7 -- false
|
||||
|
||||
-- equivalently
|
||||
even $ fib 7 -- true
|
||||
even $ fib 7 -- false
|
||||
|
||||
----------------------------------------------------
|
||||
-- 5. Type signatures
|
||||
|
Loading…
Reference in New Issue
Block a user