scala/comp2.scala
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 26 Feb 2013 17:39:47 +0000
changeset 200 8dde2e46c69d
parent 195 f06aa4e1c25b
child 205 c7975ab7c52e
permissions -rw-r--r--
added all recursive functions needed for the UF

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 
}

}