Skip to content

Commit

Permalink
objects/vector: Add copyFrom:
Browse files Browse the repository at this point in the history
Just a handy alias analogous to `array.slice(start)` in JavaScript.
  • Loading branch information
sin-ack committed Dec 8, 2024
1 parent 2ce0479 commit d27f5e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions objects/vector.self
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ std traits _AddSlots: (|
self
).

copyFrom: start = (copyFrom: start To: size).
copyFrom: start To: end = (| new |
new: copyRemoveAll.
start to: end Do: [| :i | new add: at: i ].
Expand Down

0 comments on commit d27f5e3

Please sign in to comment.