From: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: <procedure> and <generic> base class?
Date: Fri, 18 Aug 2006 14:52:29 +0100 [thread overview]
Message-ID: <87d5ay2lsy.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <J46INJ$8A8BCA4523DFB062190B80FA67AF858C@poste.it> (Marco Maggi's message of "Fri, 18 Aug 2006 07:45:19 +0200")
"Marco Maggi" <marco.maggi-ipsu@poste.it> writes:
> Ciao,
>
> when I define a generic function that accepts a procedure
> or generic function as parameter I have to define two
> identical functions:
>
> (define-method (map (p <procedure>) ...
> (define-method (map (p <generic>) ...
>
> is there a base class for <procedure> and <generic>?
Here's how you can find out:
neil@laruns:~$ guile -q
guile> (use-modules (oop goops))
guile> (apropos "class-preced")
(oop goops): class-precedence-list #<primitive-procedure class-precedence-list>
guile> (class-precedence-list <procedure>)
(#<<procedure-class> <procedure> 4031bce0> #<<class> <applicable> 4031d4c0> #<<class> <top> 4031ff40>)
guile> (class-precedence-list <generic>)
(#<<entity-class> <generic> 4031d1c0> #<<entity-class> <entity> 4031d3e0> #<<class> <object> 4031fe80> #<<class> <applicable> 4031d4c0> #<<class> <top> 4031ff40>)
guile>
So yes, it seems there is a common base class, <applicable>.
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2006-08-18 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 5:45 <procedure> and <generic> base class? Marco Maggi
2006-08-18 13:52 ` Neil Jerram [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-18 19:03 Marco Maggi
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=87d5ay2lsy.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=guile-user@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).