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

Andrew Pimlott andrew at pimlott.net
Mon Sep 19 17:17:42 EDT 2005

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.


More information about the Haskell-Cafe mailing list