-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SLICE
function
#1340
Implement SLICE
function
#1340
Conversation
Pull Request Test Coverage Report for Build 5867995917
💛 - Coveralls |
} | ||
if start < 0 { | ||
start = 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really good! The slice function will soon become a new feature. It would be nice if only very small changes were possible. Couldn't these parts be put together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended that when a negative index is given, if index remain negative even after adding the size of vector to convert it to a positive index, it falls outside the range of vector. So I change index to 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all great!
after the small conflict has been resolved, then let's ship this to the main!
resolved #1307
Description
Implement
SLICE
function that return subsets of list.Support both positive and negative
start
value[]
start
value is negative and its absolute value is over the list length, it convert to index 0.Example
SLICE(<list>, <start>, <length>)