Elf wrote: > On Mon, 27 Oct 2008, Andre van Tonder wrote: > >> On Mon, 27 Oct 2008, Elf wrote: >> >>> that said, after reading more of the discussion, i am convinced that the >>> single param comparison procedures should return #t (due to the recurrence >>> into (AND (comparison? x[n] x[n+1]) ...) demonstrated by aziz and others), >>> but that the zero param comparison procedures should signal errors. if the >>> single arg case is the null case of AND, what would the zero arg case be? >> A recursive definition can have more than one base case. Consider, for >> example, the Fibonacci sequence. However, if that bothers you, you can >> define the concept of an ordered sequence declaratively (as was done earlier >> in this thread: for all pairs of indices i, j s.t. i < j, ....). >> > > i'm fully aware that a recursive definition can have multiple base cases. > the AND breakdown does not, though. > > -elf For all pairs of indices, i,j s.t. i < j, a_i < a_j. So this is one big AND over all pairs. If there is only a single elt in the sequence, there are no pairs, so the result is (AND). If there are no elts in the sequence, there are no pairs, so the result is (AND). This seems abundantly clear to me. Regards, Jon
_______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
