|
|
|
|
|
by endgame
350 days ago
|
|
Haskell operators are generally well-chosen to have a consistent visual language: * $ is "function application" - f $ x = f x, but lets you elide nested parens: f $ g $ h x = f (g (h x)) * & is "reverse function application" x & f = f x. This reads nicely in pipelines as "and" * <$> is "fmap" what is like a lifted application over a structure: f <$> [1, 2, 3] = [f 1, f 2, f 3] * <&> is "reverse fmap", which is nice when you have a big lambda * Anything in <_> brackets is generally a "lifted" version of some operator * And so on |
|