typo in CHECK-ARG definition Will Fitzgerald 08 Apr 1999 18:45 UTC

In the documentation of the reference implementation of the list set
SRFI, a definition for CHECK-ARG is given:

;;;   Many calls to a parameter-checking procedure check-arg:
;;;    (define (check-arg pred val caller)
;;;      (let lp ((val val))
;;;        (if (pred val) val (lp (error "Bad argument" val pred
caller)))))

But the PRED and VAL parameters are switched. It should be:

;;;   Many calls to a parameter-checking procedure check-arg:
;;;    (define (check-arg val pred caller)
;;;      (let lp ((val val))
;;;        (if (pred val) val (lp (error "Bad argument" val pred
caller)))))

--
Will Fitzgerald
Neodesic Corporation

P.S. Don't you hate it when one's error checking routines cause errors?