Revision: 23323
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 4, 2010 06:27 by magicrebirth
Initial Code
(define-macro (change-list lst) `(set! ,lst (map (lambda (i) (+ i 1)) ,lst))) (define mylist '(1 2 3 4 5)) (change-list mylist)
Initial URL
Initial Description
set-car! and set-cdr! change a list 'in-place'. But, if you like the pointer metaphore... you could use macro's instead of procedures... stupidly simple example...
Initial Title
Change list in place : scheme/impromtu
Initial Tags
Initial Language
Scheme