Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Henning Thielemann lemming at henning-thielemann.de
Sat Apr 1 13:42:40 UTC 2017


On Sat, 1 Apr 2017, Andreas Abel wrote:

> In the end, I should be grateful for the FTP.  It will provide amusement 
> for years.
>
> Q: What is the length of pi?
> A: Dunno, infinity?
> Q: And what is the length of just pi?
>
> GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
> Prelude> length (Just pi)
> 1
>
> ROFL.

I have to admit that I even accept this more than length on pairs. I used 
to use Maybe for lists with length 0 or 1.


More information about the Libraries mailing list