Skip to content

Commit 356292c

Browse files
committed
CHANGE: using range instead of length for the /part argument, as it may be negative.
1 parent f0d3a71 commit 356292c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/boot/actions.reb

+11-11
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ find: action [
208208
series [series! gob! port! bitset! typeset! object! map! none!]
209209
value [any-type!]
210210
/part {Limits the search to a given length or position}
211-
length [number! series! pair!]
211+
range [number! series! pair!]
212212
/only {Treats a series value as only a single value}
213213
/case {Characters are case-sensitive}
214214
/same {Use "same?" as comparator}
@@ -228,7 +228,7 @@ select: action [
228228
series [series! port! map! object! module! none!]
229229
value [any-type!]
230230
/part {Limits the search to a given length or position}
231-
length [number! series! pair!]
231+
range [number! series! pair!]
232232
/only {Treats a series value as only a single value}
233233
/case {Characters are case-sensitive}
234234
/same {Use "same?" as comparator}
@@ -266,8 +266,8 @@ to: action [
266266
copy: action [
267267
{Copies a series, object, or other value.}
268268
value [series! port! map! object! bitset! any-function! error!] {At position}
269-
/part {Limits to a given length or position}
270-
length [number! series! pair!]
269+
/part {Limits to a given length or end position}
270+
range [number! series! pair!]
271271
/deep {Also copies series values within the block}
272272
/types {What datatypes to copy}
273273
kinds [typeset! datatype!]
@@ -277,7 +277,7 @@ take: action [
277277
{Removes and returns one or more elements.}
278278
series [series! port! gob! none!] {At position (modified)}
279279
/part {Specifies a length or end position}
280-
length [number! series! pair!]
280+
range [number! series! pair!]
281281
/deep {Also copies series values within the block}
282282
/last {Take it from the tail end}
283283
]
@@ -295,7 +295,7 @@ insert: action [
295295
series [series! port! map! gob! object! bitset!] {At position (modified)}
296296
value [any-type!] {The value to insert}
297297
/part {Limits to a given length or position}
298-
length [number! series! pair!]
298+
range [number! series! pair!]
299299
/only {Only insert a block as a single value (not the contents of the block)}
300300
/dup {Duplicates the insert a specified number of times}
301301
count [number! pair!]
@@ -306,7 +306,7 @@ append: action [
306306
series [series! port! map! gob! object! bitset!] {Any position (modified)}
307307
value [any-type!] {The value to insert}
308308
/part {Limits to a given length or position}
309-
length [number! series! pair!]
309+
range [number! series! pair!]
310310
/only {Only insert a block as a single value (not the contents of the block)}
311311
/dup {Duplicates the insert a specified number of times}
312312
count [number! pair!]
@@ -326,7 +326,7 @@ change: action [
326326
series [series! gob! port! struct!]{At position (modified)}
327327
value [any-type!] {The new value}
328328
/part {Limits the amount to change to a given length or position}
329-
length [number! series! pair!]
329+
range [number! series! pair!]
330330
/only {Only change a block as a single value (not the contents of the block)}
331331
/dup {Duplicates the change a specified number of times}
332332
count [number! pair!]
@@ -365,7 +365,7 @@ reverse: action [
365365
{Reverses the order of elements; returns at same position.}
366366
series [series! gob! tuple! pair!] {At position (modified)}
367367
/part {Limits to a given length or position}
368-
length [number! series!]
368+
range [number! series!]
369369
]
370370

371371
sort: action [
@@ -376,8 +376,8 @@ sort: action [
376376
size [integer!] {Size of each record}
377377
/compare {Comparator offset, block or function}
378378
comparator [integer! block! any-function!]
379-
/part {Sort only part of a series}
380-
length [number! series!] {Length of series to sort}
379+
/part {Limits the sorting to a given length or position}
380+
range [number! series!]
381381
/all {Compare all fields}
382382
/reverse {Reverse sort order}
383383
]

0 commit comments

Comments
 (0)