Changeset 80 for trunk/orca

Show
Ignore:
Timestamp:
03/08/06 17:12:20 (3 years ago)
Author:
volker
Message:

nested remove-each works.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/tests/working/remove-each.r

    r77 r80  
    2929print [m "result" mold head res] 
    3030 
    31 ; 
    32 ; rebol does this right, my version not 
    33 ; no idea how to do it correctly and fast. 
    34 ; 
    35 ; commented out to avoid flagging errors in regression-test 
    36 ; but keep in mind. 
    37 ; 
    38 /do[ 
    39 print "nested remove, practical use?" 
    40 blk: "123456" 
     31print "nested remove block, practical use?" 
     32blk: [1 2 3 4 5 6] 
    4133remove-each val blk[ 
    4234 print "-" 
    4335 remove-each val2 blk[ 
    44   print["inner" #"3" '= val #"2" '= val2 mold blk] 
    45   val2 = #"2" 
     36  print["inner" 2 '= val 3 '= val2 mold blk] 
     37  val2 = 3 
    4638 ] 
    47  val = #"3" 
     39 val = 2 
    4840] 
    4941print ["res=" mold blk] 
    5042 
    51 print "nested remove 2, practical use?" 
     43print "nested remove string, practical use?" 
    5244blk: "123456" 
    5345remove-each val blk[ 
     
    6052] 
    6153print ["res=" mold blk] 
     54 
     55print "^/nested remove string, practical use?" 
     56blk: "123456" 
     57remove-each val blk[ 
     58 print "-" 
     59 remove-each val2 blk[ 
     60  print["inner" #"2" '= val #"3" '= val2 mold blk] 
     61  val2 = #"3" 
     62 ] 
     63 val = #"2" 
    6264] 
     65print ["res=" mold blk] 
     66