unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jon Wilson <jsw@wilsonjc.us>
To: Bill Schottstaedt <bil@ccrma.Stanford.EDU>
Cc: bug-guile@gnu.org, Neil Jerram <neiljerram@googlemail.com>
Subject: Re: (< complex) and friends
Date: Thu, 18 Sep 2008 09:59:30 -0400	[thread overview]
Message-ID: <48D25EC2.8050305@wilsonjc.us> (raw)
In-Reply-To: <20080917214328.M24754@ccrma.Stanford.EDU>

Say you want to both filter out most elements from a list and also make 
sure that the remaining elements are sorted.

(apply < (filter some-predicate original-list))

If (<) didn't evaluate to #t, then you'd have to put code in there to 
check the length of the value you get from filter, which makes things 
uglier.  Also, having (<) => #t doesn't  hurt anything.

Bill Schottstaedt wrote:
> There are actually more problems in that area; for example:
> 
> guile> (< 2 1 1.0+3.0i)
> #f
> 
> which perhaps should be an error also.  My druthers for the
> one arg case is to simply disallow it -- why does Guile support
> stuff like:
> 
> guile> (<)
> #t
> 
> 
> 
> 
> 





  reply	other threads:[~2008-09-18 13:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 21:03 (< complex) and friends Bill Schottstaedt
2008-08-12  9:18 ` Neil Jerram
2008-09-17 21:37   ` Neil Jerram
2008-09-17 21:45     ` Bill Schottstaedt
2008-09-18 13:59       ` Jon Wilson [this message]
2008-09-18 19:02       ` Andy Wingo
2008-09-18 17:59     ` Bill Schottstaedt
2008-09-19  3:07       ` Jon Wilson
2008-09-19 23:11         ` Neil Jerram
2008-09-19 13:23     ` Bill Schottstaedt
2008-09-19 23:17       ` Neil Jerram
2008-09-19 23:59       ` Jon Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48D25EC2.8050305@wilsonjc.us \
    --to=jsw@wilsonjc.us \
    --cc=bil@ccrma.Stanford.EDU \
    --cc=bug-guile@gnu.org \
    --cc=neiljerram@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).