Skip to content

Instantly share code, notes, and snippets.

@ashmoran
Created January 21, 2011 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ashmoran/789988 to your computer and use it in GitHub Desktop.
Save ashmoran/789988 to your computer and use it in GitHub Desktop.
SICP Exercise 2.23
(define (my-for-each proc values)
(if (null? values)
#t
(let ()
(proc (car values))
(my-for-each proc (cdr values)))))
(my-for-each (lambda (x) (display x) (newline)) (list 1 3 999 3.14))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment