[plt-scheme] Simple procedure building question

From: blockstack (blockstack at gmail.com)
Date: Mon Oct 20 15:51:45 EDT 2008

I want to be able to pass a list of function names and create a
procedure
lst would be something like (f g m n) where f, g, m, and n are names
of functions

(define (B lst x y)
   (if (null? lst)
       x
   ((car lst) x (B (cdr lst) x y))))

I want to end up with a list like
(f x (g x (m x (n x y))))

I know that my current procedure won't return a list, but I know that
it must be really simple to make it do so.

I've tried different ways of using 'list' and cons, but I just can't
get it.
any help?



Posted on the users mailing list.