Hi Gerard,
I am not sure what you consider user friendly, but you have got the
following options for function header:
1) f as a "fetched" argument
my-map: func [:f blk] [...]
2) f as an "unevaluated" argument
my-map: func ['f blk] [...]
3) f as a "normally evaluated" argument (I prefer this as the most
standard using the other variants only in rare cases)
my-map: func [f blk] [...]
>Hi List,
>
>As I tried to eliminate the need to use the (:) before function names into
>Higher Order Functions I got this more user friendly
>version to work for me :
>
>
>
>>>my-map: func [f blk /local result] [
>>>
>>>
>[ result: make block! length? blk
>[ foreach item blk [
>[ append/only result do reduce [:f :item]
>
>
The expression:
do reduce [:f :item]
can be replaced by
f :item
in most situations.
The other question has been answered by Anton.
-Ladislav
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.