print_string("hey\\n");; 1+2;; let x = 2+3;; x;; x*x;; y+1;; let x = x + 1;; x;; x = x + 1;; x;; let y = 7 in y * y;; y;; 1 + 3;; 1.0 + 3.0;; 1.0 +. 3.0;; true;; 3 < 3;; 3 < 3 || 1 > 0;; 3 < 3 && 1 > 0;; not (3 < 3 && 1 > 0);; "hello";; "hello" ^ " world";; (5, "hey", 2.0);; 5, "hey", 2.0;; (5, "hey", 2.0);; fun x -> x + 2;; 5;; fun x -> x + 2;; (fun x -> x+2)3;; (fun x -> x+2)(3);; fun x -> x + 2;; fun (x,y) -> x + 2*y;; (fun (x,y) -> x + 2*y)(1,2);; let x = 5;; let f = (fun x -> x + 2);; f 3;; let h = (fun f -> (fun x -> (f x) + x));; let h = fun f x -> (f x) + x;; let f = (fun n -> if n = 1 then n else n* f (n - 1));; f 5;; let x = x + 1;; let f = (fun n -> if n = 1 then n else n* f (n - 1));; f 5;; let f = x + 1;; let f = (fun n -> if n = 1 then n else n* f (n - 1));; let f = fun x -> x + 1;; let f = (fun n -> if n = 1 then n else n* f (n - 1));; f 5;; let g = (fun n -> if n = 1 then n else n* g (n - 1));; let rec g = (fun n -> if n = 1 then n else n* g (n - 1));; g 5;; let neg = fun x -> match x with\n | true -> false\n | false -> true;; neg true;; let rec f = fun x -> match x with\n 1 -> 1\n | y -> y * f (y-1);; let rec f = fun x -> match x with\n 1 -> 1\n | x -> x * f (y-1);; let rec f = fun x -> match x with\n 1 -> 1\n | x -> x * f (x-1);; let rec f = fun x -> match x with\n 1 -> 1\n | x -> 3;; let rec f = fun x -> match x with\n 1 -> 1\n | _ -> 3;; let first = fun (x,y) -> x;; let succ = fun x -> x + 1;; let first = fun (x,y) -> x;; let succ = fun x -> x + 1;; let first = fun (x,y) -> x;; fun (f,g) -> (fun x -> (f (g x)));; let curry = fun (g -> ( fun x -> fun (y -> g(x,y))));; let curry = fun g -> fun x -> fun (y -> g (x,y));; let curry = fun g -> ( fun x -> ( fun y -> g (x,y)));; let f = fun x -> (fun y -> x + 2* y);; let g = fun (x,y) -> x + 2* y;; (curry g);; let uncurry = fun f -> (fun (x,y) -> ((f x) y));; let g = fun (x,y) -> x + 2* y;; ((curry g) 3) 4;; (f 3) 4;; (uncurry f) (3,4);; g (3,4);;