fork download
  1. type foo = {
  2. a : int ;
  3. b : string
  4. }
  5.  
  6. type bar = {
  7. a : float ;
  8. x : int
  9. }
  10.  
  11. let () =
  12. let f = { a = 1 ; b = "foo" }
  13. and b = { a = 2.3 ; x = 5 } in
  14. Printf.printf "{%d, %s}\n{%f, %d}\n" f.a f.b b.a b.x
  15.  
Success #stdin #stdout 0s 4200KB
stdin
Standard input is empty
stdout
{1, foo}
{2.300000, 5}