declare Counter local Attrs = [val] MethodTable = m(browse:MyBrowse init:Init inc:Inc) proc {Init M S Self} init(Value)=M in (S.val):=Value end proc {Inc M S Self} X inc(Value)=M in X=@(S.val) (S.val):=X+Value end proc {MyBrowse M S Self} browse=M {Browse @(S.val)} end in Counter = {Wrap c(methods:MethodTable attrs:Attrs)} end