Re: automatically call functions based on arguments
- From: "wm.annis@xxxxxxxxx" <wm.annis@xxxxxxxxx>
- Date: Tue, 29 Apr 2008 08:19:11 -0700 (PDT)
On Apr 29, 4:09 am, normanj <nii2...@xxxxxxxxx> wrote:
Suppose there are several functions (or macros):
func-aa-1-1
func-aa-2-1
func-bb-1-3
I'm not entirely sure what you're trying to accomplish here, but where
are FUNC-AA-1-1, FUNC-AA-2-1, etc, coming from? If they already exist
for you, I have nothing. But if you're writing those yourself, too,
I'd
just use a generic function with a lot of EQL specifiers:
(defmethod call-function ((sym (eql 'aa)) (a1 (eql 1)) (a2 (eql 1)))
(frobnicate-wisely-on-aa-1-1))
Basically, just ask CLOS to handle the lookup table for you.
--
wm
.
- Follow-Ups:
- Re: automatically call functions based on arguments
- From: wm.annis@xxxxxxxxx
- Re: automatically call functions based on arguments
- References:
- automatically call functions based on arguments
- From: normanj
- automatically call functions based on arguments
- Prev by Date: Re: Cells: using def-c-echo or def-slot-change-handler and unbound-variable condition
- Next by Date: Re: automatically call functions based on arguments
- Previous by thread: Re: automatically call functions based on arguments
- Next by thread: Re: automatically call functions based on arguments
- Index(es):
Relevant Pages
|
|