summaryrefslogtreecommitdiff
path: root/ocaml/lib/noun.mli
blob: 3cec58d77308553f9d23297e82f3b188e17a3e08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
type noun =
  | Atom of Z.t
  | Cell of noun * noun

exception Exit

val atom : Z.t -> noun
val atom_of_int : int -> noun
val atom_of_string : string -> noun
val cell : noun -> noun -> noun

val zero : noun
val one : noun

val is_atom : noun -> bool
val is_cell : noun -> bool
val equal : noun -> noun -> bool

val slot : Z.t -> noun -> noun
val inc : noun -> noun
val head : noun -> noun
val tail : noun -> noun
val to_list : noun -> noun list