Examples
[cc1516.git] / examples / passBy.spl
1 modif(str) :: [Char] -> Void {
2 str.tl.tl.hd = 'z';
3 }
4
5 modifAtom(x) :: Int -> Void {
6 x = 4;
7 }
8
9 main() {
10 var s = "bar";
11 var y = 1;
12 print("before modif: ", s, "\n");
13 modif(s);
14 print("after modif: ",s, "\n");
15 print("before modifAtom: ", y, "\n");
16 modifAtom(y);
17 print("after modifAtom: ", y);
18 }