% $Id: NewWrapper.oz,v 1.2 2007/10/22 04:06:12 leavens Exp $ % From the errata of the first edition of CTM declare proc {NewWrapper ?Wrap ?Unwrap} Key={NewName} in fun {Wrap X} {Chunk.new w(Key:X)} end fun {Unwrap W} try W.Key catch _ then raise error(unwrap(W)) end end end end