let rec fact n = if n < 2 then 1 else n * (fact (n - 1));; fact 5;; #trace fact;; fact 4;; #trace Lst.replicate;; Lst.replicate 4 'z';; #remove_printer Strng.toplevel_printer;; Lst.replicate 4 'z';; #untrace Lst.replicate;; Strng.from_string "asd";; Strng.of_string "asd";; Strng.to_string ['a';'b';'c'];; #install_printer Strng.toplevel_printer;; Strng.of_string "asd";; Lst.foldr1;; let p= (5, 3, ["*****"; "asdfg"; "*****"]);; let p= (5, 3, (Lst.map Strng.of_string ["*****"; "asdfg"; "*****"]));; #remove_printer Picture.toplevel_printer;; let p= (5, 3, (Lst.map Strng.of_string ["*****"; "asdfg"; "*****"]));; #install_printer Picture.toplevel_printer;; let p1 = (5, 1, Strng.of_string "hello");; let p2 = (5, 1, Strng.of_string "world");; above ;; Picture.above;; Picture.above p1 p2;; let p2 = (5, 1, [Strng.of_string "world"]);; let p1 = (5, 1, [Strng.of_string "hello"]);; Picture.above p1 p2;; Picture.beside p1 p2;; Picture.stack;; Picture.stack [p1;p2;p1;p2;p2];; foldr1;; let rec foldr1 f = function [] -> failwith "empty" | [h] -> h | h :: t -> f h (foldr1 f t);; foldr1 (+) [2;5;6];; foldr1 (fun a b -> a ^ " " ^ b) ["qw"; "er"; "ty"];; Lst.foldr (fun a b -> a ^ " " ^ b) ["qw"; "er"; "ty"] "";; Picture.pixel;; Picture.pixel 'h';; let h = Picture.pixel 'h';; let e = Picture.pixel 'e';; Picture.beside h e;; tile;; Picture.tile;; Picture.p00;; PictureData.p00;; p00;; tile;; open Picture;; tile;; tile [[p00; p01; p02]; [p10; p11; p12]];; empty 5 5;; #remove_printer Picture.toplevel_printer;; empty 5 5;;