3 ms·
Applicative style for one data Person = Person { age :: Int , name :: Text , height :: Int } Person <$> parseAge <*> parse
by whateveracct 6y ago
Applicative 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)