blob: e616e3eda959af1e77b712db0c761b7d16d2b28f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
open Nock_lib.Noun
open Nock_lib.Serial
let () =
let test n_int =
let n = atom n_int in
let jammed = jam n in
Printf.printf "jam(%d) = %s\n" n_int (bytes_to_hex jammed);
let cued = cue jammed in
match cued with
| Atom a -> Printf.printf "cue -> %s\n" (Z.to_string a)
| Cell _ -> Printf.printf "cue -> cell?!\n"
in
test 0;
test 1;
test 2;
test 42;
|