[Haskell-cafe] Fwd: extending Do notation

Kim-Ee Yeoh ky3 at atamo.com
Wed May 21 04:02:35 UTC 2014


On Wed, May 21, 2014 at 2:17 AM, Donn Cave <donn at avvanta.com> wrote:

> The multi-way-if that appears in the trac discussion is apparently,
> supported but it's a mystery to me if this has anything to do with
> lambda-if.
>

Good catch: there's no lambda-if, only multiway-if. Which isn't the same.

Lambda-if might look something like this:

do ...
    checkCondition >>= \if
      then doReportSuccess
      else doReportFailure

Compare to the originally proposed:

do ...
    if <- checkCondition
      then doReportSuccess
      else doReportFailure

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140521/ff87316b/attachment.html>


More information about the Haskell-Cafe mailing list