Skip to content

Commit

Permalink
Add new aliases for take and drop methods (#10022)
Browse files Browse the repository at this point in the history
Adds the aliases 'keep' and 'remove' to take/drop methods
  • Loading branch information
marthasharkey authored May 22, 2024
1 parent 2677e55 commit 517299b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/Array.enso
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Table/0.0.0-dev/src/Column.enso
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 517299b

Please sign in to comment.