[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

typo in CHECK-ARG definition

This page is part of the web mail archives of SRFI 3 from before July 7th, 2015. The new archives for SRFI 3 contain all messages, not just those from before July 7th, 2015.



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?