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:
Cornel Punga 2015-03-16 21:24:21 +02:00
parent adb92e5263
commit 9fb21f1ce4

View File

@ -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