chickadee » srfi-1 » every

every pred clist_1 clist_2 ...procedure

Applies the predicate across the lists, returning true if the predicate returns true on every application.

If there are N list arguments CLIST_1 ... CLIST_N, then PRED must be a procedure taking N arguments and returning a boolean result.

every applies PRED to the first elements of the CLIST_I parameters. If this application returns false, every immediately returns false. Otherwise, it iterates, applying PRED to the second elements of the CLIST_I parameters, then the third, and so forth. The iteration stops when a false value is produced or one of the lists runs out of values. In the latter case, every returns the true value produced by its final application of PRED. The application of PRED to the last element of the lists is a tail call.

If one of the CLIST_I has no elements, every simply returns #t.

Like any, every's name does not end with a question mark -- this is to indicate that it does not return a simple boolean (#t or #f), but a general value.