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

[REBOL] Re: Does REBOL cons?

From: anton:wilddsl:au at: 16-Mar-2006 19:43

Hi Jeff, I think Volker is right, probably rebol doesn't use consing as you describe it. Here is my document to understand rebol values, words, strings and blocks: do http://www.lexicon.net/antonr/rebol/doc/rebol-values.r It reflects my mental model. Ahh! actually, the confusion may be that you think: blk: [] insert blk [d] inserts a block. It does not ! The above is equivalent to: blk: [] insert blk 'd That is, only a word was inserted into the blk. After many iterations, the block is filled with many words with the same name, "d". To insert a block, you must use INSERT/ONLY: blk: [] insert/only blk [d] This results in: blk: [[d]] (Same goes for APPEND/ONLY.) Regards, Anton.