(* calc3,ml, enhanced with Mutable Pairs *)
type term =
- Intconstant of int
- | Multiplication of (term * term)
- | Addition of (term * term)
- | Variable of char
- | Let of (char * term * term)
- | Iszero of term
- | If of (term * term * term)
- | Makepair of (term * term)
- | First of term
- | Lambda of (char * term)
- | Apply of (term * term)
- | Letrec of (char * term * term)
- | Setfirst of (term * term)
- ;;
+ Intconstant of int
+ | Multiplication of (term * term)
+ | Addition of (term * term)
+ | Variable of char
+ | Let of (char * term * term)
+ | Iszero of term
+ | If of (term * term * term)
+ | Makepair of (term * term)
+ | First of term
+ | Lambda of (char * term)
+ | Apply of (term * term)
+ | Letrec of (char * term * term)
+ | Setfirst of (term * term)
+ ;;
type index = int;;