unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Lynn Winebarger <owinebar@free-expression.org>
Cc: bitwize@wizards-of-source.org, guile-devel@gnu.org
Subject: Re: How to detect a procedure
Date: Tue, 30 Apr 2002 21:46:43 -0500	[thread overview]
Message-ID: <0204302146430M.10649@locke.free-expression.org> (raw)
In-Reply-To: <87ofg0k32b.fsf@raven.i.defaultvalue.org>

On Tuesday 30 April 2002 21:35, Rob Browning wrote:
> Bruce Korb <bkorb@pacbell.net> writes:
> 
> > I would like:
> >
> >   (defined-as? 'mumble scm_class_procedure)
> >
> > to be equivalent to:
> >
> >   (and (defined? 'mumble) (procedure? mumble))
> >
> > but the latter is conceptually simpler.  I like simple.
> 
> or if you really like the idea of a helper, perhaps (nb: not tested,
> or even carefully checked :>):
> 
>   (define-macro (defined-as? item predicate)
>     `(and (defined? ,item) (,predicate ,item)))
> 
> i.e.
> 
>   (defined-as? 'mumble procedure?)

     How about  (defined-as procedure?  'mumble)
to keep the predicate clear?

Lynn

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-05-01  2:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 20:35 How to detect a procedure Bruce Korb
2002-04-29  4:52 ` bitwize
2002-04-29  9:45   ` rm
2002-04-30  0:00   ` Lynn Winebarger
2002-04-30  0:36     ` Bruce Korb
2002-04-30 13:50       ` Rob Browning
2002-05-01  1:22         ` Bruce Korb
2002-05-01  2:35           ` Rob Browning
2002-05-01  2:46             ` Lynn Winebarger [this message]
2002-05-01  3:39               ` Rob Browning
2002-05-01 21:36                 ` Bruce Korb
2002-05-01 22:18                   ` Neil Jerram

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=0204302146430M.10649@locke.free-expression.org \
    --to=owinebar@free-expression.org \
    --cc=bitwize@wizards-of-source.org \
    --cc=guile-devel@gnu.org \
    /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).