On Tue, Oct 16, 2001 at 11:18:05AM -0600, Gregg Irwin wrote: > Hi Tim, > > I think map will do what you want. Yes indeed. It's exactly what I want. :>) ==>>I note a bonus: I think I'm seeing how one passes a function as an argument. Thank you Gregg > ; Larry Palmiter's version but Ladislav and Andrew also have them > map: func [fn blk args /local result][ > result: copy [] > repeat el blk [append/only result fn :el args] > return result > ] > > >> test: [[1 2 3 4] [5 6 7 8] [9 10 11 12] [13 14 15 16 17] "one"] > == [[1 2 3 4] [5 6 7 8] [9 10 11 12] [13 14 15 16 17] "one"] > >> map :next test none > == [[2 3 4] [6 7 8] [10 11 12] [14 15 16 17] "ne"] > >> map :head test none > == [[1 2 3 4] [5 6 7 8] [9 10 11 12] [13 14 15 16 17] "one"] > > --Gregg > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[EMAIL PROTECTED]> http://www.johnsons-web.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.