[plt-scheme] 'complement'[?] of map
I think you need compose.
(define (pam datum proc-list) ((apply compose proc-list) datum))
Jos
----- Original Message -----
From: "Stephen De Gabrielle" <stephen at degabrielle.name>
To: "pltscheme" <plt-scheme at list.cs.brown.edu>
Sent: Sunday, February 17, 2008 9:59 AM
Subject: [plt-scheme] 'complement'[?] of map
> HI,
>
> Is there a form that applies a series of functions to a piece of data
>
> eg (pam data-structure '( fn1 fn2 fn3 fn4 )) [where fn is (lambda (x)
> ...)]
> that computes: (fn1 (fn2 (fn3 (fn4 data-structure))))
>
> I'm just begining to dip my toes in macros, so in the interests of
> lazyness I thought I'd better check I wasn't tryint to reinvent the
> wheel.
>
> Cheers,
>
> Stephen
>
> --
> Stephen De Gabrielle
> s.degabrielle at ucl.ac.uk
> Telephone +44 (0)20 7679 5242 (x45242)
> Mobile 079 851 890 45
> Project: Making Sense of Information (MaSI)
> http://www.uclic.ucl.ac.uk/annb/MaSI.html
>
> UCLIC: University College London Interaction Centre
> http://www.uclic.ucl.ac.uk/
>
> Remax House - 31/32 Alfred Place
> London - WC1E 7DP
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>