summaryrefslogtreecommitdiff
path: root/ocaml/lib/noun.mli
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/lib/noun.mli')
-rw-r--r--ocaml/lib/noun.mli23
1 files changed, 23 insertions, 0 deletions
diff --git a/ocaml/lib/noun.mli b/ocaml/lib/noun.mli
new file mode 100644
index 0000000..3cec58d
--- /dev/null
+++ b/ocaml/lib/noun.mli
@@ -0,0 +1,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