Haskell. Chapter 5, Part III. Function Application with $. $ is the function application operator ($) :: (a -> b) -> a -> b f $ x = f x It’s function application but: normal function application has high precedence, $ has low precedence normal function application is left associate, e.g.,
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Chapter 5, Part III
($) :: (a -> b) -> a -> b
f $ x = f x
(.) :: (b -> c) -> (a -> b) -> a -> c
f . g = \x -> f (g x)
What’s the answer?
Who can explain this answer?
How does this syntax capture semantics?
Using . and/or $