open BinTree;; open Huffman;; Node(Node(Empty,2,Empty),1,Node(Node(Empty,4,Empty),3,Empty));; #remove_printer toplevel_printer;; Node(Node(Empty,2,Empty),1,Node(Node(Empty,4,Empty),3,Empty));; #install_printer toplevel_printer;; let t = Node(Node(Empty,2,Empty),1,Node(Node(Empty,4,Empty),3,Empty));; size t;; height t;; of_list;; of_list [1;2;3;4;5];; make;; IntLst.range 1 10;; Lst.split_at 3 (IntLst.range 1 10);; Lst.split_at 9 (IntLst.range 1 10);; make (IntLst.range 1 10);; make (Lst.replicate 10 2);; make (Lst.replicate 31 2);; make (Lst.replicate 63 2);; make (Lst.replicate 35 2);; make (IntLst.range 1 63);; make ([1;2;3;4]);; insert;; Lst.concat;; Lst.concat [[1;2];[3;4];[5;6;7]];; Lst.take_while;; Lst.take_while (fun x -> x < 3) (IntLst.range 1 10);; Lst.take_while (fun x -> x < 3) (IntLst.range 1 10@[1;2]);; Lst.drop_while (fun x -> x < 3) (IntLst.range 1 10@[1;2]);; Lst.span (fun x -> x < 3) (IntLst.range 1 10@[1;2]);; Lst.until;; Lst.until (fun x -> x > 10) (fun x -> x*2) 1 ;; (=) 3;; fun x -> 3 = x;; table;; let t = tree (sample (Strng.of_string "text"));; let tab = table t;; Lst.map (lookup tab) (Strng.of_string "text");; Lst.concat (Lst.map (lookup tab) (Strng.of_string "text"));; let c = Lst.concat (Lst.map (lookup tab) (Strng.of_string "text"));; decode t c;;