(*
** Some code used in the lecture
*)

(* ****** ****** *)

datatype term =
  | TERMvar of string
  | TERMlam of (string, term) // lam x. t
  | TERMapp of (term, term)
  | TERMopr of (string, termlst)
  | TERMint of int
// end of [term]

where termlst = list0 (term)

(* ****** ****** *)

fun fprint_term (out: FILEref, t: term): void
overload fprint with fprint_term

(* ****** ****** *)

fun subst
  (t1: term, x: string, t2: term): term // t1[x->t2]
// end of [subst]

fun eval (t: term): term

(* ****** ****** *)

(* end of [lambda.sats] *)