Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Idiomatic Rebol

From: dhsunanda:gm:ail at: 2-Sep-2010 20:33

Good game! I've not looked at them all -- perhaps other will. But the last two are easily replaced by standard REBOL functions:
> reverse-list: func [series new-series][ > if empty? series [return new-series] > reverse-list next series join to-block first series new-series > ] >
Just use REVERSE: reverse [1 2 a print] == [print a 2 1]
> count-list: func [series n][ > if empty? series [return n] > count-list next series add 1 n > ] >
Just use LENGTH?: length? [1 2 a print] == 4 Check out the dictionary of REBOL words for other things you can do with a series: http://www.rebol.com/docs/dictionary.html Sunanda.