[Haskell-cafe] case of (was: [Haskell] Mixing monadic and non-monadic functions)

John Meacham john at repetae.net
Mon Sep 19 19:26:17 EDT 2005


On Mon, Sep 19, 2005 at 02:17:42PM -0700, Andrew Pimlott wrote:
> On Sat, Sep 17, 2005 at 06:56:36PM +0100, Ben Rudiak-Gould wrote:
> >   * The new syntax is really nice as a replacement for the annoyingly
> >     common "x <- foo ; case x of..." idiom that I've always disliked.
> 
> I might wish for "case of" to mean "\x -> case x of":
> 
>     foo >>= case of ...
> 
> Useful outside of monads, eg to write anonymous functions for map.

Yes. this is exactly an extension I have wanted myself too.

-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Haskell-Cafe mailing list