Added default functions, isEmpty does not typecheck...
[cc1516.git] / examples / Markus / multiple_recursion.spl
index 8676358..1810a03 100644 (file)
@@ -1,14 +1,14 @@
 // Generates a list of zeros and ones
 
-flip(n, l)
-{
-  if( n <= 0 )
-    return l;
-  else
-    return flop(n-1, 0:l);
+flip(n, l) :: Int -> [Int] -> [Int] {
+  if( n <= 0 ) {return l;} 
+  else {return flop(n-1, 0:l);}
 }
 
-flop(n, l)
-{
+flop(n, l) {
   return flip(n, 1:l);
 }
+
+main() {
+       return 0;
+}