From: Gideon Kay
Subject: passing function as argument
Date: 
Message-ID: <sSHD4.5395$OC2.139712@news2-win.server.ntlworld.com>
How do I pass the argument of a function to be defined into the evaluation
of a function which was set up to test a previous function?

eg:

(defun is-dog ()
   (let
        ((a (result-table #' eg1 three-col-table)))
         (every #' (lambda (x) (equal x corgi)) a)))


so, instead of the empty list, is it possible to give an argument, say L,
and also replace eg1 with that L. When I try I get the error message:
'symbol L passed to symbol function should have a global definition in
is-dog'.
Defining the function as above means that I can only test is-dog for eg1
rather than all the egs I need to evaluate.

Any ideas please?
From: Pierre R. Mai
Subject: Re: passing function as argument
Date: 
Message-ID: <87og80zhp3.fsf@orion.dent.isdn.cs.tu-berlin.de>
"Gideon Kay" <···@virgin.net> writes:

> How do I pass the argument of a function to be defined into the evaluation
> of a function which was set up to test a previous function?

Didn't I already answer this yesterday?  See posting on similar
topic.  Short form:

(defun is-dog (fun)
  (let ((result-table (result-table fun threee-col-table)))
    (every #'(lambda (x) (equal x corgi)) result-table)))

Regs, Pierre.

-- 
Pierre Mai <····@acm.org>         PGP and GPG keys at your nearest Keyserver
  "One smaller motivation which, in part, stems from altruism is Microsoft-
   bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]