Fix `ormap' error messages in HTDP languages.

This commit is contained in:
Sam Tobin-Hochstadt 2011-04-05 20:16:14 -04:00
parent 9d55c6c202
commit f9bf318a90

View File

@ -16,9 +16,9 @@
(define-teach intermediate ormap (define-teach intermediate ormap
(lambda (f l) (lambda (f l)
(unless (and (procedure? f) (procedure-arity-includes? f 1)) (unless (and (procedure? f) (procedure-arity-includes? f 1))
(hocheck 'andmap "first argument must be a <procedure> that accepts one argument, given ~e" f)) (hocheck 'ormap "first argument must be a <procedure> that accepts one argument, given ~e" f))
(unless (beginner-list? l) (unless (beginner-list? l)
(hocheck 'andmap "second argument must be of type <list>, given ~e" l)) (hocheck 'ormap "second argument must be of type <list>, given ~e" l))
(let loop ([l l]) (let loop ([l l])
(if (null? l) #f (beginner-or (f (car l)) (loop (cdr l))))))) (if (null? l) #f (beginner-or (f (car l)) (loop (cdr l)))))))