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

Jon Zeppieri zeppieri at gmail.com
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://list.cs.brown.edu/pipermail/plt-scheme/attachments/20090427/c33977d2/attachment.htm


More information about the plt-scheme mailing list