(scm-error 'wrong-type-arg (symbol->string caller)
"Wrong type argument: ~S" (list arg) '()))
-(define-syntax check-arg
- (syntax-rules ()
- ((_ pred arg caller)
- (if (not (pred arg))
- (wrong-type-arg 'caller arg)))))
+(define-syntax-rule (check-arg pred arg caller)
+ (if (not (pred arg))
+ (wrong-type-arg 'caller arg)))
(define (out-of-range proc arg)
(scm-error 'out-of-range proc
(define map! map)
(define (filter-map proc list1 . rest)
- "Apply PROC to to the elements of LIST1... and return a list of the
+ "Apply PROC to the elements of LIST1... and return a list of the
results as per SRFI-1 `map', except that any #f results are omitted from
the list returned."
(check-arg procedure? proc filter-map)