package body localpoint is
point: Point;
procedure makePoint(x, y: Real); ...
function x_coord return Real; ...
function y_coord return Real; ...
end localpoint
value localpoint =
let p: Point = ref((0,0)) in
{makepoint = fun(x: Real, y: Real) p := (x, y),
x_coord = fun() fst(p)
y_coord = fun() snd(p)}