Jeff said:
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
HahaHAHhahHAHAhA!! I WIN AGAIN1!! ! 1 1!! ! ! ! ! !!1 1
In this case, yes, but this isn't a general solution.
Compose/deep evaluates every parenthesized expression in the
block, no matter what level. So you have to make sure that
you never use parenthesized subexpressions. For instance
this fails:
funky: func ['f][func [block] compose/deep [
foreach element block [(f) (element + 3)]]
]
or this:
funky2: func ['f] [func [block] compose/deep [
foreach element block [do composite (f) (func [x] [x + 3]) element]]]
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com