scala/comp2.scala
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 26 Feb 2013 12:47:03 +0000
changeset 197 0eef61c56891
parent 195 f06aa4e1c25b
child 205 c7975ab7c52e
permissions -rw-r--r--
added an al

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 
}

}