Created
October 1, 2012 12:44
-
-
Save lambdaman2/3811452 to your computer and use it in GitHub Desktop.
Scheme: Change list in place : scheme/impromtu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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