On Thu, 2017-08-24 at 10:05 +0200, David Kastrup wrote:
> Christopher Howard writes:
>
> > Hi, in another lisp I have been working with, it has <, >, and ==
> > (structure equality) operators which can take string arguments,
> > number
> > arguments, or a mixture
Ralf Mattes writes:
> On Thu, Aug 24, 2017 at 10:29:41AM +0200, Arne Babenhauserheide wrote:
>> Hi Christopher,
>>
>> You can use GOOPS to make them generic:
>>
>> > (import (oop goops))
>> > (< "a" "b")
>
> That's not what David suggested.
No, it is not. I wrote my
On Wed, 23 Aug 2017 22:05:37 -0800
Christopher Howard wrote:
> Hi, in another lisp I have been working with, it has <, >, and ==
> (structure equality) operators which can take string arguments, number
> arguments, or a mixture of both. But it seems in guile that
On Thu, Aug 24, 2017 at 10:29:41AM +0200, Arne Babenhauserheide wrote:
> Hi Christopher,
>
> You can use GOOPS to make them generic:
>
> > (import (oop goops))
> > (< "a" "b")
That's not what David suggested. Of course you still need to define the
method specialized on strings.
> :3:0: :3:0:
Hi Christopher,
You can use GOOPS to make them generic:
> (import (oop goops))
> (< "a" "b")
:3:0: :3:0: In procedure <: Wrong type argument in
position 1: "a"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
[1]> (define-method (< (a ) (b )) (string (< "a" "b")
$1 = #t
Christopher Howard writes:
> Hi, in another lisp I have been working with, it has <, >, and ==
> (structure equality) operators which can take string arguments, number
> arguments, or a mixture of both. But it seems in guile that there are
> separate comparison
Hi, in another lisp I have been working with, it has <, >, and ==
(structure equality) operators which can take string arguments, number
arguments, or a mixture of both. But it seems in guile that there are
separate comparison operators for strings and for numbers. This makes
sense but is not very