From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arne Babenhauserheide Newsgroups: gmane.lisp.guile.user Subject: Re: Comparison operators for strings /and/ numbers? Date: Thu, 24 Aug 2017 10:29:41 +0200 Message-ID: <87378hjrhn.fsf@web.de> References: <1503554737.21598.3.camel@qlfiles.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1503563599 26333 195.159.176.226 (24 Aug 2017 08:33:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 08:33:19 +0000 (UTC) Cc: Guile User Mailing List To: Christopher Howard Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Aug 24 10:33:15 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dknZf-0006S7-IC for guile-user@m.gmane.org; Thu, 24 Aug 2017 10:33:11 +0200 Original-Received: from localhost ([::1]:47230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dknZm-0006cC-8m for guile-user@m.gmane.org; Thu, 24 Aug 2017 04:33:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dknZ3-0006aE-V7 for guile-user@gnu.org; Thu, 24 Aug 2017 04:32:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dknYz-0002N0-2L for guile-user@gnu.org; Thu, 24 Aug 2017 04:32:33 -0400 Original-Received: from mout.web.de ([212.227.15.3]:58854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dknYy-0002M9-Lk for guile-user@gnu.org; Thu, 24 Aug 2017 04:32:28 -0400 Original-Received: from fluss ([85.212.71.208]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lecda-1dC3B31ZPi-00qSgs; Thu, 24 Aug 2017 10:32:23 +0200 In-reply-to: <1503554737.21598.3.camel@qlfiles.net> X-Provags-ID: V03:K0:njwZGVyt9kmZTMRTfiuGn5yGyNHRaJDz1Rik9WWp2puKQkEr5Ll qk8Yan9voH8xAfmKIznrzau1FhWwvcbTGteJ+FGVMvuJzaOnLUNew3rKqSrHAua3cBBKe0t PweSF9ACxuk+o75FqT2fL8klpRTJrmiPlG07BpaNEOhGPQ1gZLi8upGHtvTpN2GpfUp2sOH gXUh73iVNzEj0mErEEnDw== X-UI-Out-Filterresults: notjunk:1;V01:K0:r0lS09w3GIo=:7trjW1ujaBX5dZiyNfTaMr Wtu9YUNxQfHWdX1cCLfELUxQrcyRxEwVeWX3bBvHsix0ZfyVsl0pn2VMl5kglAlPhNla7Me70 H936G3w7azBWBwL0O5MEkgYJ84XA6fjEYb6cpZ7Iimr4WLCM4FrYQMd5OCg6jqclSm196DFyr KKFnf1dRxyPYEIdKlDGleHcVJ667OUNSo5P6Ubh+3Bd9Aeos3ir/Pdf/PVsnzxtT5cOiQzGPl EJzfbn5qKb+ITbtJlc6C4nvIS3jscxo0rzWD1UUenpH5o8YQzvj9bVg31jQxdls/Nsubb1kzz qbpBwmwsodfAJuZlom4dUYLMNlyO2EfdBBqNgFaqw6CJwqTx3paGPSYQJ0NCAQ3Merds54PHI TO+ciFfK8n/JLZqyi8ZSJsKlOAWMluXbA5RO0D8EKiEPDEBWxF3R3wWjxM+dn/kcDaX7rDt+G VWPFURjKNYNWhcEDkyjISpjjpzz8B3Zq/jXlqeZdwe71cEOSC/1Bf8DhP9RR29086vO70D2OA BoHzprukCF2SYS9uiQ5aAkaAMQzpQVOKiWJFbCykH7Jx8E/WtHELu4Wy4CNE3AzhGzCwi+Bp5 1tQQIX4yDHEXEqfN4lSdUhadKpAURAawksl/cVnx8SCYpviJISytEghbn80AHkh2TcCMa7hnK gfbFKzRqZWpgeORm5COCe324mp7D33W0jK5oE6Ry4qWiL0hCgfkXwL5r+Pt1aGSKtuUinfca1 cOqiJaJxo2SLwUbPuP9k2cspZCtNZqmmFrBpLfsE4qsW1GHaW3xGR/Dk6dwnS0b7QTw8gFvA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14051 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =3D #t For some functions you might need to call (define-generic ) before this (you=E2=80=99ll notice because define-method will signal an err= or). Best wishes, Arne Christopher Howard writes: > Hi, in another lisp I have been working with, it has <, >, and =3D=3D > (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. =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein ohne es zu merken --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAlmejxYACgkQE++NRSQD w+t2IxAAumDjujHOwEFontBRuq+EVvV/c3XCRVqcx21hVoLP1Uz8KlB6ayVI/eeh aTWjEXNw0wB/GQS9tVeMOBLqderWEEZzq+uICbi2EIBxAJG5lwIpVxGJCtDO/a/A yrp+CrOepAmu7eNndk8APXqvnDl7jCGiH6XrlopNwwWdWLpVbkkXH8JTXupcl1xo VbEDhWvJJy+l+PnjRBunnMecdMFidMBlWtf7p+eKv05waHMmtHHkMwQ23xIgTsXe nFId0qfpPlh8l5PQqEQ2gwajxWgXgomB8KT7zug9nJCZu0etqA5HcAP2O3VgrmNo Ao5Y8pi1Q8PXYhntfURgFOpaVbCFv0xKRBFZ29hjXTKlgrBOcjxkBL5ND/36M+aF TuNsBDjqFBiUg4lWvwFcugpnNLIAYkIq+lMd2hxWsVRIaUOFC3EbUdwnCU32g5Dh XEybmprwP5DsqRA+ItytuPC3cjuQC+vuSMe0pdHDgHD+riZDe7ZvbkpnkUv0C05X t77Ouu7E6odZ8Scj2itGmpCgm4N6p1LVYXxVwdoNgeD2+qwKuxoxvQOBkm344937 Nz9CkpHfRMbXICL1gKnd7MWMWVTDDqzXzI+yfD8kpoaqq/d+xTpp3JwseAEtlh99 FSfDMsAQiKq9B+Mno3X3g+n/zqjmTmOfVaYDzDDAAATlSyx3tHE= =IFk/ -----END PGP SIGNATURE----- --=-=-=--