Module Js_of_ocaml_compiler.Duplicate
val closure :
Js_of_ocaml_compiler.Code.program ->
f:Js_of_ocaml_compiler.Code.Var.t ->
params:Js_of_ocaml_compiler.Code.Var.t list ->
cont:(int * Js_of_ocaml_compiler.Code.Var.t list) ->
int Stdlib.Array.t ->
Js_of_ocaml_compiler.Code.program
* Js_of_ocaml_compiler.Code.Var.t
* Js_of_ocaml_compiler.Code.Var.t list
* (int * Js_of_ocaml_compiler.Code.Var.t list)Given a program and a closure f -- defined by its name, parameters, and its continuation --, return a program with a copy of f. Also returns the new name of f, and the similarly substituted parameter list and continuation.