guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparison operators for strings /and/ numbers?


From: Chris Vine
Subject: Re: Comparison operators for strings /and/ numbers?
Date: Thu, 24 Aug 2017 14:31:41 +0100

On Wed, 23 Aug 2017 22:05:37 -0800
Christopher Howard <address@hidden> 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 there are
> separate comparison operators for strings and for numbers. This makes
> sense but is not very convenient for my present purpose. Is there some
> other guile operators or extension operators that will handle both? I
> could make some I'm sure, but I don't want to reinvent the wheel.

The predicate equal? will compare numbers, strings and records.

https://www.gnu.org/software/guile/docs/master/guile.html/Equality.html#index-equal_003f

Chris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]