scala/comp2.scala
changeset 195 f06aa4e1c25b
child 205 c7975ab7c52e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scala/comp2.scala	Mon Feb 25 15:12:48 2013 +0000
@@ -0,0 +1,19 @@
+package object comp2 {
+
+//  Recusive function to Abacus translation
+
+import lib._
+import abacus._
+import recs._
+
+def arity(f: Rec) = f match {
+  case Z => 1
+  case S => 1
+  case Id(n, _) => n
+  case Cn(n, _, _) => n
+  case Pr(n, _, _) => n
+  case Mn(n, _) => n 
+}
+
+}
+