Skip to content

Instantly share code, notes, and snippets.

@lambdaman2
Created October 1, 2012 12:44
Show Gist options
  • Select an option

  • Save lambdaman2/3811452 to your computer and use it in GitHub Desktop.

Select an option

Save lambdaman2/3811452 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