[nem-en] Improvement in where macro
Igor Tkachev
it at rsdn.ru
Thu Feb 1 03:45:49 CET 2007
Hello vc,
Should we have more generic solution for single match?
Something like
def b = x is Some(y) when y > 100;
or
def b = x match Some(y) when y > 100;
???
> I add some improvement in when macro.
> Now you can write:
> def x = Some(123);
> when (x is Some(y))
> WriteLine(y);
> // or
> when (x is Some(y) when y > 100)
> WriteLine(y);
> instead:
> match (x)
> {
> | Some(y) when y > 100 => WriteLine(y);
> | _ => ()
> }
--
Best regards,
Igor mailto:it at rsdn.ru
More information about the devel-en
mailing list