previous up next    
Next: : Up: Patterns Previous: :

:

matches anything, and binds identifier to a procedure of one argument that mutates the corresponding field of the matching value. This pattern must be nested within a pair, vector, box, or structure pattern. For example, the expression:

(define x (list 1 (list 2 3)))
(match x [(_ (_ (set! setit)))  (setit 4)])
mutates the cadadr of x to 4, so that x is '(1 (2 4)).



PLT