
15 Mar
2011
15 Mar
'11
12:34 p.m.
Quoth Tillmann Rendel
Where-clauses can only be used on equations, not on expressions or statements, so you would need to float the where clause outwards:
So ... not to put too fine a point on it, but ... as useful as function notation could be for the present purposes, you seem to agree that because of syntax limits, "where" isn't an answer to the problem. Recalling that we were talking about a common pattern v <- fx case v of ... ... (where v never appears again) Where a Haskell programmer's reflex seems to call for fx >>= case ..., or from the old thread mentioned earlier, a lambda with multiple definitions - fx >>= \ Opt1 -> ... Opt2 -> ... Donn Cave, donn@avvanta.com