On Mon, Dec 09, 2024 at 11:37:33AM +, 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 i
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, |(les
On Mon, Dec 9, 2024 at 12:43 PM wrote:
> On Mon, Dec 09, 2024 at 11:37:33AM +, 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_
On Mon, Dec 09, 2024 at 01:20:48PM +0100, Mikael Djurfeldt wrote:
> On Mon, Dec 9, 2024 at 12:43 PM wrote:
>
> > On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote:
> > > Hi Jeremy,
> > >
> > > Am 09.12.2024 11:21 schrieb Jeremy Korwin-Zmijowski:
> > > > The reference says :
> > > >
On Mon, Dec 9, 2024 at 1:37 PM wrote:
> On Mon, Dec 09, 2024 at 01:20:48PM +0100, Mikael Djurfeldt wrote:
> > On Mon, Dec 9, 2024 at 12:43 PM wrote:
> >
> > > On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote:
> > > > Hi Jeremy,
> > > >
> > > > Am 09.12.2024 11:21 schrieb Jeremy K
On Mon, Dec 9, 2024 at 1:58 PM Mikael Djurfeldt
wrote:
> On Mon, Dec 9, 2024 at 1:37 PM wrote:
>
>> On Mon, Dec 09, 2024 at 01:20:48PM +0100, Mikael Djurfeldt wrote:
>> > On Mon, Dec 9, 2024 at 12:43 PM wrote:
>> >
>> > > On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote:
>> > >
On Mon, Dec 09, 2024 at 01:58:08PM +0100, Mikael Djurfeldt wrote:
[...]
> No problem---I'm too.
>
> Think about it this way:
>
> How would you sort this list of numbers: 7 1 3 8 2 1 4 ?
>
> It's 1 1 2 3 4 7 8, right? That is what we want (sort '(7 1 3 8 2 1 4)) to
> output (+ the parentheses o
No problem---I'm too.
Think about it this way:
How would you sort this list of numbers: 7 1 3 8 2 1 4 ?
It's 1 1 2 3 4 7 8, right? That is what we want (sort '(7 1 3 8 2 1 4)) to
output (+ the parentheses of course).
Now, `sorted?' returns true if its input is what `sort' would have
produced a
Hi Guilers,
Doing Advent of Code 2024, I was trying to use `sorted?` procedure. And
something bothered me.
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
el
-- Original Message --
From to...@tuxteam.de
To guile-user@gnu.org
Date 09.12.2024 12:42:22
Subject Re: sorted?
On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote:
Hi Jeremy,
Am 09.12.2024 11:21 schrieb Jeremy Korwin-Zmijowski:
> The reference says :
>
>Scheme
On Mon, Dec 09, 2024 at 01:54:47PM +, Stefan Schmiedl wrote:
> -- Original Message --
> > From to...@tuxteam.de
> To guile-user@gnu.org
> Date 09.12.2024 12:42:22
> Subject Re: sorted?
>
> > On Mon, Dec 09, 2024 at 11:37:33AM +, Ricardo G. Herdt wrote:
> > > Hi Jeremy,
> > >
> >
On Mon, Dec 09, 2024 at 07:32:09PM +0100, Mikael Djurfeldt wrote:
> On Mon, Dec 9, 2024 at 2:11 PM wrote:
>
> > On Mon, Dec 09, 2024 at 01:58:08PM +0100, Mikael Djurfeldt wrote:
> >
> > [...]
> >
> > > No problem---I'm too.
> > >
> > > Think about it this way:
> > >
> > > How would you sort this
-- Original Message --
From to...@tuxteam.de
To "Stefan Schmiedl"
Cc guile-user@gnu.org
Date 09.12.2024 15:10:18
Subject Re: sorted?
On Mon, Dec 09, 2024 at 01:54:47PM +, Stefan Schmiedl wrote:
-- Original Message --
> From to...@tuxteam.de
To guile-user@gnu.org
Date
On Mon, Dec 09, 2024 at 07:14:10PM +, Stefan Schmiedl wrote:
> -- Original Message --
> > From to...@tuxteam.de
[...]
> > This seems the intention. But since it accepts an arbitrary "less"
> > function, it ends being iffy. How do you go from some "less" to a
> > "less-or-equal" withou
We are thrilled to announce version 1.0.0 of the Shepherd, no less than
twenty-one years after its initial alpha release! We believe Shepherd
has become a solid tool, meeting the kind of user experience one has
come to expect since systemd. Check out the web site to learn more:
https://gnu.org
On Mon, Dec 9, 2024 at 2:11 PM wrote:
> On Mon, Dec 09, 2024 at 01:58:08PM +0100, Mikael Djurfeldt wrote:
>
> [...]
>
> > No problem---I'm too.
> >
> > Think about it this way:
> >
> > How would you sort this list of numbers: 7 1 3 8 2 1 4 ?
> >
> > It's 1 1 2 3 4 7 8, right? That is what we want
("two kinds of sort")
On Mon, Dec 9, 2024 at 7:32 PM Mikael Djurfeldt
wrote:
> On Mon, Dec 9, 2024 at 2:11 PM wrote:
>
>> On Mon, Dec 09, 2024 at 01:58:08PM +0100, Mikael Djurfeldt wrote:
>>
>> [...]
>>
>> > No problem---I'm too.
>> >
>> > Think about it this way:
>> >
>> > How would you sort t
On Mon, Dec 9, 2024 at 7:59 PM wrote:
> > (= a b) is equivalent to (not (or (< a b) (> a b)))
>
> Yes, but for that, you have to know what "=" is. Is it eq? Is it
> eqv? Is it equal? (yeah, lame pun with question marks). Or is it
> (see below)?
>
It's equal in the sense of (not (or (< a b) (> a
On Mon, Dec 9, 2024 at 8:23 PM wrote:
> (lambda (p1 p2) (< (car p1) (car p2)))
>
> Then you'd need a corresponding equal, because otherwise you
> end up with things which are neither less nor equal nor greater,
> i.e. the ordering isn't total, which is bad for sorting :)
>
`sort' assumes that
On Mon, Dec 9, 2024 at 8:45 PM Mikael Djurfeldt
wrote:
> On Mon, Dec 9, 2024 at 8:23 PM wrote:
>
>> (lambda (p1 p2) (< (car p1) (car p2)))
>>
>> Then you'd need a corresponding equal, because otherwise you
>> end up with things which are neither less nor equal nor greater,
>> i.e. the ordering
On Mon, Dec 09, 2024 at 08:45:33PM +0100, Mikael Djurfeldt wrote:
> On Mon, Dec 9, 2024 at 8:23 PM wrote:
>
> > (lambda (p1 p2) (< (car p1) (car p2)))
> >
> > Then you'd need a corresponding equal, because otherwise you
> > end up with things which are neither less nor equal nor greater,
> > i.
Den mån 9 dec. 2024 21:36 skrev:
> On Mon, Dec 09, 2024 at 08:45:33PM +0100, Mikael Djurfeldt wrote:
> > On Mon, Dec 9, 2024 at 8:23 PM wrote:
> >
> > > (lambda (p1 p2) (< (car p1) (car p2)))
> > >
> > > Then you'd need a corresponding equal, because otherwise you
> > > end up with things whic
22 matches
Mail list logo