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
Good to know thanks Jean!
L
>
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
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
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
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 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
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
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: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
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:
(
11 matches
Mail list logo