4 ms·
In my own experience these "Haskelly" abstractions do a fantastic job "bringing something to the forefront". I love when I'm working with a parser and switch fr
by tel 13y ago
In my own experience these "Haskelly" abstractions do a fantastic job "bringing something to the forefront". I love when I'm working with a parser and switch from Monadic mode to Applicative mode as it emphasizes a notion of application sequencing instead of procedural sequencing. When I concatenate strings using (<>) instead of (++) I emphasize that strings can be thought of as lists which are free monoids. Especially nice are the laws like
Text.unpack (s1 <> s2) === Text.unpack s1 <> Text.unpack s2
which bring to the forefront that both the Unicode safe Text type and the String type share that monoidal structure.