A piece-wise defined mathematical operator or equivalent which is multi-core friendly

Version 1 (Original Version)

```
var i = 1
let x = 0
switch(i){
case 1:
x=i
break
case 2:
x=i+1
break
case 3:
x=i-1
break
case 4:
x=i^2
break
}
```

Version 2

```
let x = {
i, when i==1;
i+1, when i==2;
i-1, when i==3;
i^2, when i==4;
}
```