[REBOL] Re: Set on path values
From: rudolf:meijer:telenet:be at: 13-Aug-2007 12:27
Thanks! This worked first time around. I was apprehensive of the binding of
the expressions to be evaluated as path members, but this was fine. Is that
the magic of [do val]?
RWM> Does anyone have a suggestion for a one-argument function that will do
RWM> [suit-size/:hand/:suit: suit-size/:hand/:suit + 1] just like incr cnt RWM> would
do [cnt: cnt + 1]?
Something like this?
incr: func ['val] [do reduce [to set-path! :val 1 + do val]]