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

Re: Have one-argument '<? et al function as 'make<? et al



On Sat, Mar 15, 2014 at 6:02 PM, Alan Manuel Gloria <almkglor@xxxxxxxxx> wrote:
> It's not clear to me if (<? c) would mean anything useful anyway, so

On second thought:

#!sweet
define (sorted-list? srfi-114-comparator list)
! apply <? srfi-114-comparator list

The above function will work properly on an empty list (we assume
empty list is sorted) if (<? c) returns #t.  But if (<? c) were to
return a function, it would instead return a function (well, a
function *is* a true value, so it will still work 99.99% of the
time....)

Sincerely,
AmkG