File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ repeat: native [
272
272
remove-each: native [
273
273
{Removes values for each block that returns true; returns removal count.}
274
274
'word [word! block! ] {Word or block of words to set each time (local)}
275
- data [series! ] {The series to traverse (modified)}
275
+ data [series! map! ] {The series to traverse (modified)}
276
276
body [block! ] {Block to evaluate (return TRUE to remove)}
277
277
]
278
278
Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ skip_hidden: ;
477
477
// Remove hole (updates tail):
478
478
if (windex < index ) Remove_Series (series , windex , index - windex );
479
479
SET_INTEGER (DS_RETURN , index - windex );
480
+ if (IS_MAP (value )) return R_ARG2 ;
480
481
return R_RET ;
481
482
}
482
483
Original file line number Diff line number Diff line change @@ -307,4 +307,13 @@ Rebol [
307
307
308
308
===end-group===
309
309
310
+ ===start-group=== "remove-each with map!"
311
+ ;@@ https://github.com/red/REP/issues/93
312
+ --test-- "remove-each with map"
313
+ m: # (a 1 "b" 2 c #[none] d: 3 )
314
+ --assert m = remove-each [k v] m [any [string? k none? v]]
315
+ --assert [a d] = words-of m
316
+
317
+ ===end-group===
318
+
310
319
~~~end-file~~~
You can’t perform that action at this time.
0 commit comments