When

When evaluates (in order) each given expression expr1..N return the corresponding value when it evaluates to true.

If no match is found then nothing is returned (no samples).

T when(Boolean expr1, T arg1, Boolean expr2, T arg2, ... Boolean exprN, T argN)

T is a type variable, so it can bind any type

  • when.txt
  • Last modified: 2019/07/01 14:21
  • by a.leofreddi