[Haskell-cafe] Generalizing catMaybes
roma at ro-che.info
Sat Jan 8 12:09:24 CET 2011
* Henning Thielemann <lemming at henning-thielemann.de> [2011-01-08 12:06:33+0100]
> On Sat, 8 Jan 2011, Roman Cheplyaka wrote:
> >I think catMaybes deserves its own typeclass, which would represent
> >"truncatable" structures:
> > class Truncatable struct where
> > catMaybes :: struct (Maybe a) -> Maybe a
> But catMaybes has the type
> catMaybes :: struct (Maybe a) -> struct a
> for struct = 
Thanks, that was a typo.
Roman I. Cheplyaka :: http://ro-che.info/
Don't worry what people think, they don't do it very often.
More information about the Haskell-Cafe