5 ms·
It's not clear to me what you're trying to show? Are you saying the later examples look more complex?
by chrissoundz 7y ago
It's not clear to me what you're trying to show? Are you saying the later examples look more complex?
- whateveracct 7y agoMy guess: The latter examples look unfamiliar (looks like Haskell) while the first example looks familiar to the general eye (looks like any PL) The things being compared don't even have the same purpose so idt comparing them even makes sense /shrug
- dmitriid 7y agoOf course they do. Of course they are. The simplest code change turns the code in to a monadic/functor soup.
- agentultra 7y ago... and if you program in Haskell that's exactly what you want. Programming with these abstractions is common and well supported in Haskell.
- whateveracct 7y agoGiven what the examples are doing (describing inputs) I don't see how you solve it ergonomically without higher kinded types, which in turn leads to functors etc.