Skip to content

Instantly share code, notes, and snippets.

@lambdamusic
Created February 7, 2013 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lambdamusic/4734291 to your computer and use it in GitHub Desktop.
Save lambdamusic/4734291 to your computer and use it in GitHub Desktop.
Scheme: Change list in place : scheme/impromtu
(define-macro (change-list lst)
`(set! ,lst (map (lambda (i) (+ i 1)) ,lst)))
(define mylist '(1 2 3 4 5))
(change-list mylist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment