-
-
Save ashmoran/790194 to your computer and use it in GitHub Desktop.
This file contains 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 (my-for-each proc values) | |
(if (null? values) | |
#t | |
(let () | |
(proc (car values)) | |
(my-for-each proc (cdr values))))) | |
(import srfi-1) | |
(use srfi-1) | |
(define (my-begin . statements) | |
(last statements)) | |
(define (my-for-each proc list-of-values) | |
(if (null? list-of-values) | |
#t | |
(my-begin | |
(proc (car list-of-values)) | |
(my-for-each proc (cdr list-of-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