On Wed, 2004-07-21 at 16:37, Kostas Oikonomou wrote: > Suppose I have a function f(), and a list L = [x1,x2,...]. > Is there an elegant way to map f onto L, i.e. compute [f(x1),f(x2),...]? > I thought something like that was in the IPL, but if so, I can't find it. > > And does this work if my f has arguments? E.g. L is a list of real numbers, and > I want to format each one by applying frn(.,,2) to it.
Although it's not the intended use, take a look at the Closure class in the 'Unilib' at http://tapestry.tucson.az.us/unicon. I think one of the invoke() methods there will do what you want (assuming I correctly understand what you're looking for). -- Steve Wampler <[EMAIL PROTECTED]> ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Unicon-group mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unicon-group