Hi
I can’t understand why we use ref in modules,
in my book :
module Element = struct type t = int end;;
module Queue =
struct
type element = Element.t
type queue = element list ref
let create() = ((ref []) : queue)
end;;
Can you explain to me the “ref” in module Queue?
Thank you in advance.