(************************************************************ transparency.ml Created : Sat Jul 12 02:03:51 2003 Last modified: Sat Jul 12 02:09:51 2003 Compile: ocamlc transparency.ml -o transparency # FTP Directory: sources/ocaml # ************************************************************) (** 伝わるー。そりゃそうだ @author Takashi Masuyama *) type mut = { mutable name : string } let _ = let data = [ { name = "tak" } ] in let f lst = match lst with hd::_ -> hd.name <- "aki"; lst | _ -> failwith "none"; in let after = f data in print_endline (List.hd data).name; print_endline (List.hd after).name