1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
open List let double x = x * 2 let add a b = a + b module Math = struct let pi = 3.14159 let circle_area r = pi *. r *. r end class counter = object val mutable n = 0 method inc = n <- n + 1 method get = n end