Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

passing function as argument

12 views
Skip to first unread message

Gideon Kay

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to
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?


Pierre R. Mai

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to
"Gideon Kay" <g...@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 <pm...@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]

0 new messages