On Thu, Sep 28, 2006 at 04:40:30PM +0300, Yitzchak Gale wrote: > Now given any function binding using pattern guards: > > funlhs > | qual11, qual12, ..., qual1n = exp1 > | qual21, qual22, ..., qual2n = exp2 > ... > > we translate the function binding into Haskell 98 as: > > funlhs = runExit $ do > maybeExit $ do {qual11'; qual12'; ...; qual1n'; return (exp1)} > maybeExit $ do {qual21'; qual22'; ...; qual2n'; return (exp2)} > ...
Or even funlhs = fromJust $ do {qual11'; qual12'; ...; qual1n'; return (exp1)} `mplus` do {qual21'; qual22'; ...; qual2n'; return (exp2)} _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime