From: Barry Margolin
Subject: Re: Programming help needed!!
Date: 
Message-ID: <2u556sINNa5r@early-bird.think.com>
In article <··········@portal.gmu.edu> ·······@mason1.gmu.edu (Ljudevit Bauer) writes:
>I'm writting some stuff in lisp and I'm stuck.  I have a function which
>accepts two lists as arguments.  Elements of one list can be lisp or
>user-defined functions which are later used inside the function.  How do
>I assign the function to an atom so that I can call it later?  The
>function call looks like this:
>> (myfunct '((? x numberp)) '(99))
>it's supposed to return true if (numberp 99) returns true, nil
>otherwise.  I need to assign numberp to a symbol, and I have no idea how
>to do that.

I suspect your problem isn't how to "assign numberp to a symbol" -- that's
simply (setq <symbol> 'numberp) -- but how to call the function named in an
argument.  If you're using Common Lisp or something similar, this is what
FUNCALL and APPLY are for.

So if you've extracted the function name from the first argument, you can
then use something like:

	(return-from myfunct
	  (funcall function-name argument))
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar