On Oct 21, 2008, at 11:04 AM, Ken Dickey wrote: > No. Actually, I'd like a holds-for-all which returns #f as the > base case.
You can push it down, but you can't escape making these exceptions. Nonrecursive definitions: for-all p? [a_i, ...] = (and (p? a_i) ...) holds-for-all p? [] = #f ;;; Exception to the and rule holds-for-all p? [a_i, ...] = (and (p? a_i) ...) this holds-for-all is more complex than the plain for-all. Recursive definitions: for-all p? [] = #t for-all p? [a : as] = (and (p? a) (for-all p? as)) holds-for-all p? [] = #f ;;; Exception again holds-for-all p? [a] = (p? a) holds-for-all p? [a : as] = (and (p? a) (holds-for-all p? as)) this holds-for-all is also more complex than the plain for-all. There's a reason why this holds-for-all does not appear as often in math (even elementary high-school math) as the vanilla for-all. Aziz,,, _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
