[plt-scheme] 299.105
At Sun, 8 May 2005 20:41:51 +0200, Erich Rast wrote:
> ==> serialize: expects argument of type <serializable object>; given
> #<procedure:43:2>
The procedure on line 43 is `add-key', and procedures aren't
serializable.
Probably you meant for it to be a private method instead of a private
field, and the same for `remove-key'. Changing the definitions to
(define/private (add-key key)
(set! keys (append keys (list key))))
(define/private (remove-key key)
(set! keys (remove key keys)))
allows serialization to proceed.
Matthew