[Haskell-cafe] Foldable for (,)

MarLinn monkleyon at gmail.com
Wed May 3 18:06:41 UTC 2017


"Square root of negative one" doesn't make a lot of sense if you ignore 
the context of complex arithmetic. And it appears to make even less 
sense that this expression should have several different solutions. Yet 
quaternions are used today to describe the rotation of robots.

In other words: Robots – more than meets the i! Robots are cool. Don't 
hate on robots. Don't be uncool.

An analog is true for /Traversable/ and /Foldable/. Part of the missing 
context here is that you can write generic functions and later plug in 
things like the 1-tuple (/Identity/) and get cool things. Just look at 
lenses.

What the instances in question really show is that some operations are 
transparent in relation to type-level products (i.e. tuples). A 
different place that shows the same are functions like "first" and 
"second" that you'll find in the context of profunctors, categories, and 
arrows. There's more than meets the eye here, and part of the reason you 
don't get to benefit a lot from it is that that's still an active area 
of research. From my own gut feeling it may well be where part of the 
future of programming lies. Which, in my eyes, is pretty cool.

But then I'm just a random type still in the process of folding Haskell 
theory through my Identity.

Cheers,
MarLinn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170503/3fb70092/attachment.html>


More information about the Haskell-Cafe mailing list