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

set-all

 [1/1] from: rotenca::telvia::it at: 27-Sep-2001 16:59


Trying to reach a full working set-all, i have witten the second version of my brainless function. There is something right? Rebol[ Title: "set-all" Date: 27/09/01 Author: "Romano Paolo Tenca" Email: [rotenca--libero--it] Version: 1.0.1 27/09/01 15:53 Note: { not /any refinement do not set path to unset value } ] set-all: func [[catch] word [any-word! any-block!] value /local valuea] [ sin: func [x v][ either any-word? :x [ set reduce [:x] :v ] [ do compose[(to-set-path :x) :v] ] ] throw-on-error [ if any-word? :word [return set :word :value] if any[set-path? :word path? :word lit-path? :word] [word: reduce [:word]] valuea: :value while [not tail? word] [ either any-block? :valuea [ sin first word either tail? :valuea [none][first :valuea] valuea: next valuea ][ sin first word :valuea ] word: next :word ] :value ] ] --- Ciao Romano