mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-01-14 13:15:59 +00:00
parent
89e2a788d8
commit
8544847845
@ -209,14 +209,15 @@ foo 5 -- 75
|
|||||||
-- the expression on its right is applied as the parameter to the function on its left.
|
-- the expression on its right is applied as the parameter to the function on its left.
|
||||||
|
|
||||||
-- before
|
-- before
|
||||||
(even (fib 7)) -- false
|
even (fib 7) -- false
|
||||||
|
|
||||||
-- after
|
|
||||||
even . fib $ 7 -- false
|
|
||||||
|
|
||||||
-- equivalently
|
-- equivalently
|
||||||
even $ fib 7 -- false
|
even $ fib 7 -- false
|
||||||
|
|
||||||
|
-- composing functions
|
||||||
|
even . fib $ 7 -- false
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
-- 5. Type signatures
|
-- 5. Type signatures
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user