[EMAIL PROTECTED] wrote:
> 
> > Nor does the technique generalize:
> >
> >         mapper: func ['f] [func [block] compose [foreach element
> >         block [(f)
> > element]]]
> 
>   Sure it does, with one little difference:
> 
>   mapper: func ['f][func [block] compose/deep [
>       foreach element block [(f) element]]
>   ]
> 
>         l: mapper (func [x][prin odd? x])
>         l [1 2 3 4 5]
>         truefalsetruefalsetrue
> 

My experience with other languages leads me to want a 'map that can
take an argument function, returning a function which can be applied
to a block to yield a block of (corresponding) results, as in
(HYPOTHETICAL):

    >> map: ; MISSING (I have no idea at this point)
    >> map-odd: map odd?
    >> map-odd [1 2 3 4 5]
    == [true false true false true]

Could someone (Jeff?) supply the definition for 'map missing above?

-jn-

Reply via email to