[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: sorted?
From: |
Maxime Devos |
Subject: |
RE: sorted? |
Date: |
Thu, 12 Dec 2024 16:40:09 +0100 |
>On Mon, Dec 09, 2024 at 11:37:33AM +0000, Ricardo G. Herdt wrote:
>> Hi Jeremy,
>>
>> Am 09.12.2024 11:21 schrieb Jeremy Korwin-Zmijowski:
>> > The reference says :
>> >
>> > Scheme Procedure: *sorted?* items less
>> > C Function: *scm_sorted_p* (items, less)
>> >
>> > Return |#t| if items is a list or vector such that, for each
>> > element x and the next element y of items, |(less y x)| returns
>> > |#f|. Otherwise return |#f|.
>> >
>> > I think the description should be :
>> >
>> > Return |#t| if items is a list or vector such that, for each element
>> > x and the next element y of items, |(less y x)| returns |#t|.
>> > Otherwise return |#f|.
>>
>> Actually no, since less is applied to y and x in that order. This way
>> (sorted? '(1 1) <) correctly returns #t as your experiments show.
>I don't get it. (< 1 1) is /always/ #f, regardless of the order of the
ones?
Please read the description closely. (< 1 1) returns #false, so ‘sorted?’
returns #false according to the first description.
- Re: sorted?, (continued)
- Re: sorted?, tomas, 2024/12/09
- Re[2]: sorted?, Stefan Schmiedl, 2024/12/09
- Re: sorted?, tomas, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- Re: sorted?, tomas, 2024/12/09
- Re: sorted?, Mikael Djurfeldt, 2024/12/09
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?, Maxime Devos, 2024/12/12
- RE: sorted?,
Maxime Devos <=
RE: sorted?, Maxime Devos, 2024/12/12