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

[REBOL] Re: Block building

From: lennart:nylen:biz at: 25-Nov-2002 7:25

2002-11-24 20:28:00, Ted and Suzanne Landis <[landi--mac--com]> wrote:
>Given the following object: > > >> probe Object1 > >make object! [ > String1: "ABC" > Block1: ["DEF" "GHI"] > Block2: ["JKL" "MNO" "PQRSTUVWXYZ"] >] > >I need to build a block containing all of the string fields: >["ABC" "DEF" "GHI" "JKL" "MNO" "PQRSTUVWXYZ"] > >I have found two ways to do it: > > >> compose [(Object1/String1) (Object1/Block1) (Object1/Block2)] > >and > > >> head insert (union Object1/Block1 Object1/Block2) Object1/String1 > >Comments? Suggestions?
Out of those two, I'd say go with the first. a) It's simpler and cleaner (good rule of thumb when REBOLing). b) It's more generic (thus more reusable). Be adviced, you're about to learn about 500 other ways to do it...;-) Cheers! /Lennart Fridén ([lennart--nylen--biz]) The World is not sane so why should I be?