我对OCaml中的内存管理感到好奇.通过程序调用共享列表时.例如:
let rec insertAux v acc l =
match l with
| [] -> acc
| h::t -> insertAux v ((v::h) :: acc) t;;
let insert v l = insertAux v l l;;
let rec sublist l =
match l with
| [] -> [[]]
| head::tail -> insert head (sublist tail);;
Run Code Online (Sandbox Code Playgroud)
insertAux中的哪些元素/列表被复制或共享?