Skip to content

Instantly share code, notes, and snippets.

@284km
Last active January 26, 2018 07:20
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 284km/6e1416288ef7f564437edc68ff16ae47 to your computer and use it in GitHub Desktop.
Save 284km/6e1416288ef7f564437edc68ff16ae47 to your computer and use it in GitHub Desktop.
SICP の 2.23 の練習問題のやつ.scm
(define (for-each proc items)
(if (null? items)
#f
(begin
(proc (car items))
(for-each proc (cdr items)))
)
)
(for-each (lambda (x) (newline) (display x)) (list 57 321 88))
gosh> (for-each (lambda (x) (newline) (display x)) (list 57 321 88))
57
321
88#f
何もしない。のやり方がわからなくて #f にした...。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment