It's also easy to do it without defining any new type: let a = ref [||];; let get_array () = match !a with [||] -> ( a := Array.make 10 0; !a ) | _ -> !a;;
about | contact Other archives ( Real Estate discussion Medical topics )
Mailing lists
Newsgroups
RFC archive