[plt-scheme] cannot get mapping over procedures (procedure applications) to work

From: Jon Zeppieri (zeppieri at gmail.com)
Date: Mon Apr 27 11:21:55 EDT 2009

On Mon, Apr 27, 2009 at 11:16 AM, keydana at gmx.de <keydana at gmx.de> wrote:

> Hi all,
>
> this seems like a horribly stupid thing to ask, but I have problems to map
> over procedures (in order to apply them). When I try
>
> (map (lambda (fun) (fun 1 2)) '(* +))
>
> I get
>
> "procedure application: expected procedure, given: *; arguments were: 1 2"
>
>
The problem here is that '(* +) is a list containing the symbols * and +,
not the functions.  You want (list * +) or `(,* ,+).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090427/c33977d2/attachment.html>

Posted on the users mailing list.