[Haskell-cafe] [Maybe Int] sans Nothings

Richard O'Keefe ok at cs.otago.ac.nz
Tue May 24 03:21:57 CEST 2011

On 24/05/2011, at 5:49 AM, Alexander Solla wrote:
> There's a library function for it, but also:
> > filter ((/=) Nothing)

The problem with that in general is that it only
applies to [Maybe t] if Eq t, but you don't
actually _need_ t to support equality.
filter isJust
will do the job, where isJust is in Data.Maybe.

More information about the Haskell-Cafe mailing list