Hi,
in !1701 `ly:beam::calc-knee' checks whether all list-elements are equal.
Basically doing (apply eqv? ).
Tbh, I don't understand why it works...
Though, the need to check a list for all list-elements are equal
happened to me not only once.
Thus, would it be acceptable to add something like:
(
Le 06/11/2022 à 13:03, Thomas Morley a écrit :
Hi,
in !1701 `ly:beam::calc-knee' checks whether all list-elements are equal.
Basically doing (apply eqv? ).
Tbh, I don't understand why it works...
eqv? has no problem working on more than two elements.
scheme@(guile-user)> (eqv? 1 1)
$1 = #t
s
Am So., 6. Nov. 2022 um 13:07 Uhr schrieb Jean Abou Samra :
>
> Le 06/11/2022 à 13:03, Thomas Morley a écrit :
> > Hi,
> >
> > in !1701 `ly:beam::calc-knee' checks whether all list-elements are equal.
> > Basically doing (apply eqv? ).
> > Tbh, I don't understand why it works...
>
>
> eqv? has no p
Le 06/11/2022 à 13:27, Thomas Morley a écrit :
Ofcourse not, though you need to know that the chosen proc is suitable
for the task.
For me eqv? was always meant to work with exactly two values, like cons.
But (apply cons '(1 2 3)) fails ofcourse.
In the past I searched the guile-manual and our
Le 06/11/2022 à 13:27, Thomas Morley a écrit :
Call me surprised.
The guile manual only gives code-examples comparing _two_ values with
eq? and friends.
I didn't know and didn't imagine it would work for more arguments as
you wrote above.
Well, call me surprised too. R5RS section 6.1 defines e
Am So., 6. Nov. 2022 um 13:39 Uhr schrieb Jean Abou Samra :
>
>
>
> Le 06/11/2022 à 13:27, Thomas Morley a écrit :
> > Ofcourse not, though you need to know that the chosen proc is suitable
> > for the task.
> > For me eqv? was always meant to work with exactly two values, like cons.
> > But (apply
Le 05/11/2022 à 18:39, Jean Abou Samra a écrit :
Le 05/11/2022 à 17:26, Jean-Charles Malahieude a écrit :
Le 03/11/2022 à 21:31, Jean Abou Samra a écrit :
Hi Jean-Charles,
What is your procedure for filling in commit IDs in translated
files? It looks like a number of them don't exist in the
Thomas Morley writes:
> Call me surprised.
> The guile manual only gives code-examples comparing _two_ values with
> eq? and friends.
> I didn't know and didn't imagine it would work for more arguments as
> you wrote above.
The Guile manual may be somewhat fixated on the C interface which only
t
Note the detail that + a b c and eq? a b c don't do the exact same thing:
+ a b c is equivalent to (a + b) + c
eq? a b c is equivalent to (a == b) && (b == c)
The list form has short circuiting if I remember right (eq? bails out on
the first false it finds), but I don't remember how evaluation wo
Le 06/11/2022 à 16:13, Luca Fascione a écrit :
Note the detail that + a b c and eq? a b c don't do the exact same thing:
+ a b c is equivalent to (a + b) + c
eq? a b c is equivalent to (a == b) && (b == c)
Yes. On the other hand, Scheme (+ a b c d) behaves like Python a+b+c+d,
and Scheme (eq
Good to know thanks Jean!
L
>
Am So., 6. Nov. 2022 um 13:39 Uhr schrieb Jean Abou Samra :
>
>
>
> Le 06/11/2022 à 13:27, Thomas Morley a écrit :
> > Ofcourse not, though you need to know that the chosen proc is suitable
> > for the task.
> > For me eqv? was always meant to work with exactly two values, like cons.
> > But (apply
12 matches
Mail list logo