Is there a LISP equivalent of the CLOS 'compute-applicable-methods'?
I mean, is there a function which can take as arguments a function and
potential argument(s) to that function and return NIL or T depending
on whether the given arg is a suitable input to that function?
TIA,
--
8<--------------------------->8
Richard Shepherd.
(···@math.waikato.ac.nz)
In article <···········@thebes.waikato.ac.nz>,
Richard Shepherd <···@waikato.ac.nz> wrote:
>Is there a LISP equivalent of the CLOS 'compute-applicable-methods'?
CLOS *is* Lisp (well, it is part of Common Lisp).
>I mean, is there a function which can take as arguments a function and
>potential argument(s) to that function and return NIL or T depending
>on whether the given arg is a suitable input to that function?
No. Type checking is generally done by the functions themselves, there's
no database that such a validity checking function could use.
--
Barry Margolin
BBN PlaNET Corporation, Cambridge, MA
······@bbnplanet.com
Phone (617) 873-3126 - Fax (617) 873-6351
Barry Margolin (······@tools.bbnplanet.com) wrote:
> CLOS *is* Lisp (well, it is part of Common Lisp).
Yes, I know, I meant for functions that were not generic functions such as
LISP builtins, and user defined functions made with defun.
> No. Type checking is generally done by the functions themselves, there's
> no database that such a validity checking function could use.
Thank you. After a bit more thought I realised that no such function could
exist, especially for user defined functions. Sorry for not thinking enough
b4 opening my mouth and mindlessly posting.......
--
8<--------------------------->8
Richard Shepherd.
(···@math.waikato.ac.nz)
In article <··········@tools.bbnplanet.com> ······@tools.bbnplanet.com (Barry Margolin) writes:
From: ······@tools.bbnplanet.com (Barry Margolin)
Newsgroups: comp.lang.lisp,comp.lang.clos
Date: 26 Feb 1996 14:55:31 -0500
Organization: BBN Planet Corp., Cambridge, MA
Path: agate!ihnp4.ucsd.edu!swrinde!howland.reston.ans.net!newsfeed.internetmci.com!news.mathworks.com!uunet!in2.uu.net!mercury.near.net!tools.bbnplanet.com!not-for-mail
Lines: 17
References: <···········@thebes.waikato.ac.nz>
Xref: agate comp.lang.lisp:21032 comp.lang.clos:3678
In article <···········@thebes.waikato.ac.nz>,
Richard Shepherd <···@waikato.ac.nz> wrote:
>Is there a LISP equivalent of the CLOS 'compute-applicable-methods'?
CLOS *is* Lisp (well, it is part of Common Lisp).
>I mean, is there a function which can take as arguments a function and
>potential argument(s) to that function and return NIL or T depending
>on whether the given arg is a suitable input to that function?
No. Type checking is generally done by the functions themselves, there's
no database that such a validity checking function could use.
The Python Compiler of CMUCL does a pretty good job at figuring out
(i.e. inferring - British Spelling?!?) the signatures fo functions.
However, this might not meet your requests.
Cheers
--
Marco Antoniotti - Resistente Umano
===============================================================================
International Computer Science Institute | ·······@icsi.berkeley.edu
1947 Center STR, Suite 600 | tel. +1 (510) 643 9153
Berkeley, CA, 94704-1198, USA | +1 (510) 642 4274 x149
===============================================================================
...it is simplicity that is difficult to make.
...e` la semplicita` che e` difficile a farsi.
Bertholdt Brecht