% $Id: SumAgentMaker.oz,v 1.2 2007/11/13 22:40:18 leavens Exp leavens $ % To see how to do this with NewPortObject, see NewPortObjectTest.oz \insert 'NewPortObject.oz' declare fun {SumAgentMaker} {NewPortObject 0 fun {$ N Msg} case Msg of add(X) then N+X [] get(?Z) then Z=N N end end } end