[erlang-questions] style question - best way to test multiple non-guard conditions sequentially

Richard A. O'Keefe <>
Mon Jun 24 00:17:05 CEST 2013


On 21/06/2013, at 8:21 PM, Anthony Ramine wrote:

> qual -> pat '<-' expr.
> qual -> bin_pat '<=' expr.
> qual -> expr.
> 
> And then I would also add two generators which do not skip elements but crash instead:
> 
> qual -> pat '<:-' expr.
> qual -> bin_pat '<:=' expr.

I don't understand what these are supposed to do.
Would you care to say more?
> 
> I do like the different direction you took though. Allowing only guards mean matches can be handled differently, thus one could write X = foo() instead of begin X = foo(), true end.

I've been using X <- [foo()].




More information about the erlang-questions mailing list