Add new aliases for take and drop methods (#10022)

Adds the aliases 'keep' and 'remove' to take/drop methods
This commit is contained in:
marthasharkey 2024-05-22 09:02:48 +01:00 committed by GitHub
parent 2677e556e8
commit 517299bb09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 13 additions and 13 deletions

View File

@ -148,7 +148,7 @@ type Array
sort self (order = Sort_Direction.Ascending) on=Nothing by=Nothing on_incomparable=Problem_Behavior.Ignore =
Array_Like_Helpers.sort self order on by on_incomparable
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Selections
ICON parse3
Creates a new `Vector` with only the specified range of elements from the
@ -164,7 +164,7 @@ type Array
take self range=(Index_Sub_Range.First 1) =
Array_Like_Helpers.take self range
## ALIAS skip
## ALIAS skip, remove
GROUP Selections
ICON parse3
Creates a new `Vector`, removing any elements from the specified range.

View File

@ -1005,7 +1005,7 @@ Text.repeat : Integer -> Text
Text.repeat self count=1 =
0.up_to count . fold "" acc-> _-> acc + self
## ALIAS first, head, last, left, limit, mid, right, slice, substring, tail, top
## ALIAS first, head, last, left, limit, mid, right, slice, substring, tail, top, keep
GROUP Selections
ICON split_text
Creates a new Text by selecting the specified range of the input.

View File

@ -956,7 +956,7 @@ type Vector a
slice : Integer -> Integer -> Vector Any
slice self start end = Array_Like_Helpers.slice self start end
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Selections
ICON parse3
Creates a new `Vector` with only the specified range of elements from the
@ -972,7 +972,7 @@ type Vector a
take self range=(Index_Sub_Range.First 1) =
Array_Like_Helpers.take self range
## ALIAS skip
## ALIAS skip, remove
GROUP Selections
ICON parse3
Creates a new `Vector`, removing any elements from the specified range.

View File

@ -1197,7 +1197,7 @@ type DB_Column
sort self order=Sort_Direction.Ascending =
self.to_table.order_by [Sort_Column.Index 0 order] . at 0
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Standard.Base.Selections
ICON parse3
Creates a new Column with the specified range of rows from the input
@ -1209,7 +1209,7 @@ type DB_Column
take : (Index_Sub_Range | Range | Integer) -> DB_Column
take self range=(First 1) = self.to_table.take range . at 0
## ALIAS skip
## ALIAS skip, remove
GROUP Standard.Base.Selections
ICON parse3
Creates a new column from the input with the specified range of rows

View File

@ -711,7 +711,7 @@ type DB_Table
result = self.filter column Filter_Condition.Is_True
Warning.attach (Deprecated.Warning "Standard.Database.DB_Table.DB_Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Standard.Base.Selections
ICON select_row
Creates a new Table with the specified range of rows from the input
@ -743,7 +743,7 @@ type DB_Table
take self range=(First 1) =
Take_Drop_Helpers.take_drop_helper Take_Drop.Take self range
## ALIAS skip
## ALIAS skip, remove
GROUP Standard.Base.Selections
ICON select_row
Creates a new Table from the input with the specified range of rows

View File

@ -2310,7 +2310,7 @@ type Column
sorted = self.to_vector.sort order by=wrapped
Column.from_vector self.name sorted
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Standard.Base.Selections
ICON parse3
Creates a new Column with the specified range of rows from the input
@ -2323,7 +2323,7 @@ type Column
take self range=(First 1) =
Index_Sub_Range_Module.take_helper self.length self.at self.slice (slice_ranges self) range
## ALIAS skip
## ALIAS skip, remove
GROUP Standard.Base.Selections
ICON parse3
Creates a new Column from the input with the specified range of rows

View File

@ -1538,7 +1538,7 @@ type Table
result = self.filter column Filter_Condition.Is_True
Warning.attach (Deprecated.Warning "Standard.Table.Table.Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result
## ALIAS first, head, last, limit, sample, slice, tail, top
## ALIAS first, head, last, limit, sample, slice, tail, top, keep
GROUP Standard.Base.Selections
ICON select_row
Creates a new Table with the specified range of rows from the input
@ -1570,7 +1570,7 @@ type Table
take self range=(First 1) =
Index_Sub_Range_Module.take_helper self.row_count self.rows.at self.slice (slice_ranges self) range
## ALIAS skip
## ALIAS skip, remove
GROUP Standard.Base.Selections
ICON select_row
Creates a new Table from the input with the specified range of rows