[Haskell-cafe] Generalizing catMaybes

David Menendez dave at zednenem.com
Sat Jan 8 23:24:48 CET 2011


On Sat, Jan 8, 2011 at 5:07 PM, Tony Morris <tonymorris at gmail.com> wrote:
>
> Thanks guys for all the solutions. A slight correction below.
>
> On 09/01/11 03:54, David Menendez wrote:
>>
>> Naturally, if you also have pure and fmap, you also have a monad.
> You have a pointed functor but not necessarily a monad.

You perhaps missed the word "also". If you have join, and you also
have pure and fmap, then you have a monad.

That's admittedly a little fuzzy about what it means to have join,
since the laws join must satisfy are defined in terms of fmap and
pure.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>



More information about the Haskell-Cafe mailing list