2 ms·
Why is <$> for example easier to read, type, understand, Google, or any dimension really over "fmap"?
by Macha 6y ago
Why is <$> for example easier to read, type, understand, Google, or any dimension really over "fmap"?
- whateveracct 6y agoApplicative style for one data Person = Person { age :: Int , name :: Text , height :: Int } Person <$> parseAge <*> parseName <*> parseHeight Applicative style is one of the easiest constructs to read relative to the power of what it typically does. Most other times when you use <$>, you're using it instead of something like this: fmap f $ x y z Which is simplified by f <$> x y z Google is a non-issue. Hoogle exists and works great (and can even index all symbols importable by your project)