I just stumbled upon the package OneTuple on hackage. I want to know it’s purpose, I’m certain the author didn’t create it just for the fun of it. So when can this be useful? It’s quite clear what it does, but not when one would use it.
So, anyone know any cool examples when you can benefit from this? Or perhaps show the mathematical beauty behind it?
It’s nearly the same as the
Identitymonad, which is commonly used as the base of a monad transformer stack, except that sinceOneTupleusesdatainstead ofnewtypeit has an additional bottom value.It’s interesting because it’s in a sense the most trivial example of most of the type classes it implements. I don’t see much of a practical use for it, though.