Thanks.

I was reading some codes in ML, and it was commented this was the case. I
didn't know Haskell had the equivalent behavior. I always thought once the
pattern was matched there is no going back.

>> I may be confused about what you're asking for, but Haskell does
>> this by default:
>>
>> foo (Left x) | x>3 = "bar"
>> foo _ = "splat"
>>
>> Main> foo (Left 5)
>> "bar"
>> Main> foo (Left 1)
>> "splat"


_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to