|
|
|
Pattern matching structures
|
|
14 Pattern matching structures
This isn't yet implemented, proposed syntax is something like:
switch e {
case {next = {next = null}, data = a}:
return a;
case {next = null, data = a}:
return a + 1;
case _:
return 0;
}
|
|
|
Pattern matching structures
|
|