REBOL 3.0

Apply Function

Carl Sassenrath, CTO
REBOL Technologies
13-Dec-2006 1:55 GMT

Article #0055
Main page || Index || Prior Article [0054] || Next Article [0056] || 24 Comments || Send feedback

REBOL 3.0 supports the apply function (i.e. the Lisp concept). It simply evaluates a function with the arguments provided in a block.

apply :afunc [1 "test" example]

The 64K question is: does apply reduce the block first? If we are true to the design of functions like make, then it would not.

You can always add your own reduce function:

apply :afunc reduce [1 "test" example]

We could even create reapply if we think it has sufficient value.

24 Comments

REBOL 3.0
Updated 19-Apr-2024 - Edit - Copyright REBOL Technologies - REBOL.net