Merge branch 'master' of https://github.com/dopefishh/cc1516
[cc1516.git] / examples / Markus / multiple_recursion.spl
index 8676358..bfe6701 100644 (file)
@@ -1,14 +1,10 @@
 // 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);
 }