Changes between Version 3 and Version 4 of WatchedObjects


Ignore:
Timestamp:
Oct 13, 2009, 6:30:09 AM (10 years ago)
Author:
rme
Comment:

add example of watching a list

Legend:

Unmodified
Added
Removed
Modified
  • WatchedObjects

    v3 v4  
    228228 ...
    229229}}}
     230
     231== Lists ==
     232
     233As previously mentioned, WATCH only watches individual cons cells.
     234
     235{{{
     236? (defun watch-list (list)
     237    (maplist #'watch list))
     238WATCH-LIST
     239? (defvar *l* (list 1 2 3))
     240*L*
     241? (watch-list *l*)
     242((1 2 3) (2 3) (3))
     243? (setf (nth 2 *l*) 'foo)
     244> Error: Write to the CAR of watched cons cell (3)
     245>        Faulting instruction: (movq (% rsi) (@ 5 (% rdi)))
     246> While executing: %SETNTH, in process listener(1).
     247> Type :POP to abort, :R for a list of available restarts.
     248> Type :? for other options.
     249}}}