3 ms·
So this is a fun read and probably also lots of fun to write. One fact that does not get enough mention though is that, regardless of the code golfing results,
by theK 4y ago
So this is a fun read and probably also lots of fun to write.
One fact that does not get enough mention though is that, regardless of the code golfing results, Haskell programs have the habit of being exceptionally concise even if you don't try to write short code.
- cole-k 4y agoPart of it (but certainly not all of it) is because of all the funny instances hanging around. I'm able to exploit the Semigroup b => (a -> Semigroup b) instance in a WIP version for example. And using (<*>) on the Applicative instance of (-> r) is a favorite of mine.
- chowells 4y ago... To be super ridiculously over-the-top pedantic... That Applicative instance is on ((->) r). If you could actually do type-level sections, that'd be (r ->). But type-level sections are the same as type-level lambdas, and they would break a lot about Haskell's type system so they don't exist. All of which is to say, great work.
- cole-k 4y agoRight you are, I never remember the proper name for the instance. I only use it to spaghettify code.