type foo = {bar:int;baz:int};;
let x = {bar=1;baz = 2};
();;
x;;
let x = {bar=1;baz = 2};;
{ x with baz = 3 };;
#quit;;
for i = 1 to 1000000 do print_int i; print_newline (); done;;
let c = ref 0 in for i = 1 to 1000000 do c := c + i; done; print_int i;;
let c = ref 0 in for i = 1 to 1000000 do c := !c + i; done; print_int !c;;
#quit;;
const 1;;
#quit;;
List.rev
;;;
(,);;
let foldl1 f (x::xs) = foldl f x xs
;;
let foldl1 f (x::xs) = List.fold_left f x xs;;
#quit;;
compare (1,2) (2,1);;
(1,2) >
(2,1);;
#quit;;
let foo = function | (0|1) -> true | n -> false;;
foo 1;;
let foo = function | (0|1) when false -> true | n -> false;;
foo 1;;
#quit;;
