Fieldselectors when assigning
[cc1516.git] / examples / old / quickTest.spl
index 8a9cc26..da09eeb 100644 (file)
@@ -1,9 +1,11 @@
-x() {
-    return [[1,2,3]];
+printInts(xs) :: [Int] -> Void {
+    if(isEmpty(xs)) { return; }
+    else { print(xs.hd); printInts(xs.tl); }
 }
 
 main() {
-
-    var z = x().hd.hd;
-
+    var xs = [1,2,3];  
+    xs.hd = 18;
+    xs.tl = [];
+    printInts(xs);
 }
\ No newline at end of file