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

[REBOL] Re: Don't try this at home

From: carl::cybercraft::co::nz at: 27-Nov-2002 22:43

Hi Ammon, The simpliest way (that I know of) to produce that is this...
>> a: []
== []
>> insert/only a a
== []
>> a
== [[...]] So, it means a block within itself...
>> length? a
== 1
>> same? a a/1
== true And I try not to think about it... (: Carl. On 27-Nov-02, Ammon Johnson wrote:
> HI again! > The answer is a simple COPY/DEEP: >>> foreach word [a b c] [ > [ append blkr COPY/DEEP compose [make (word) []] > [ blkr: third blkr > [ ] > That way it gets a new block each time just like the console does. > ;-) > Enjoy!! > Ammon Johnson --- CIO > Addept ------------------ (www.addept.ws) > 435-616-2322 -------- ([ammon--addept--ws]) > ----- Original Message ----- > From: "Ammon Johnson" <[ammon--rcslv--com]> > To: <[rebol-list--rebol--com]> > Sent: Wednesday, November 27, 2002 1:07 AM > Subject: [REBOL] Don't try this at home >> Hi, >> Has anyone seen a block that looks like this: >> [...] >> I just discovered it, and I would like to know what it means, it >> was > generated by the following code: >>>> blk: blkr: [] >> == [] >>>> foreach word [a b c] [ >> [ append blkr compose [make (word) []] >> [ blkr: third blkr >> [ ] >> == [make b [...] make c [...]] >>>> blk >> == [make a [make b [...] make c [...]]] >>>> blkr >> == [make b [...] make c [...]] >> Two things, it shouldn't have given me that result, and if you DO >> it then > the console dies, no message or anything. Shouldn't it have > essentially done this: >> >>>> blk: blkr: [] >> == [] >>>> word: 'a >> == a >>>> append blkr compose [make (word) []] >> == [make a []] >>>> blkr: third blkr >> == [] >>>> word: 'b >> == b >>>> append blkr compose [make (word) []] >> == [make b []] >>>> blkr: third blkr >> == [] >>>> word: 'c >> == c >>>> append blkr compose [make (word) []] >> == [make c []] >>>> blk >> == [make a [make b [make c []]]] >>>> >> >> Any ideas? >> >> Thanks!! >> Ammon Johnson --- CIO >> Addept ------------------ (www.addept.ws) >> 435-616-2322 -------- ([ammon--addept--ws])
-- Carl Read