changeset 195 | f06aa4e1c25b |
child 205 | c7975ab7c52e |
194:fc2a5e9fbb97 | 195:f06aa4e1c25b |
---|---|
1 package object comp2 { |
|
2 |
|
3 // Recusive function to Abacus translation |
|
4 |
|
5 import lib._ |
|
6 import abacus._ |
|
7 import recs._ |
|
8 |
|
9 def arity(f: Rec) = f match { |
|
10 case Z => 1 |
|
11 case S => 1 |
|
12 case Id(n, _) => n |
|
13 case Cn(n, _, _) => n |
|
14 case Pr(n, _, _) => n |
|
15 case Mn(n, _) => n |
|
16 } |
|
17 |
|
18 } |
|
19 |