-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add First(list), Last(list) and Last(list,func) #3365
Conversation
This returns the first element of the given list; i.e., it is roughly equivalent to `First(list, ReturnTrue)`.
`Last(list)` returns the last element of the list, while `Last(list, func)` returns the last element for which the predicate `func` returns true.
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 good!
The error is due to the qaos package which defines a global |
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 like this addition, nice! I was going to ask you to remove the whitespace before the end );
lines at the end of an InstallMethod
, but I saw that this is how it is done everywhere else in the file, so no bother.
Another PR I had sitting around for a couple years...