prog.ml

   1: record bob = { foo : string = "Hello";
   2:                bar : string;
   3:                mutable n : int = 1 }
   4: 
   5: record weird = { x : weird option = (Some (create_weird ~x:None ())) }
   6: 
   7: let _ =
   8:   let x = create_bob ~bar:"World" () in
   9:   x.n <- x.n + 1;
  10:   Printf.printf "%s %s %i\n" x.foo x.bar x.n

This document was generated using caml2html