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

[REBOL] Accessing a variable's method

From: varnoux::atmel::fr at: 10-Oct-2003 17:35

Hi List, I have a list of objects: /l: copy [] obj: make object! [ a: none calc: does [self/a: (self/a + 1)]] append l make obj [a: 1] append l make obj [a: 2]/ I would like to write a function like: /inc-obj: func [arg][ arg/calc ]/ That would allow me to do: /foreach o l [ inc-obj o ] / And output: /probe (first l)/a/ /2 //probe (second l)/a/ /3 /Is it possible ? Best regards, Vincent