Skip to content
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

I'd like a BatSet.nth #612

Closed
UnixJunkie opened this issue May 4, 2015 · 6 comments
Closed

I'd like a BatSet.nth #612

UnixJunkie opened this issue May 4, 2015 · 6 comments
Assignees

Comments

@UnixJunkie
Copy link
Member

Like List.nth: get the element at the given rank or raise Invalid_argument

@UnixJunkie
Copy link
Member Author

Of course, I can implement it, if deemed useful.

@gasche
Copy link
Member

gasche commented May 4, 2015

Feel free to, that seems like a natural feature to have. Maybe we could only have nth_exn and nth_opt, and not have to decide on whether nth should raise an exception or not?

@UnixJunkie
Copy link
Member Author

OK, I will add at_exn (I just read in BatList nth is depecrated), then wrap it to provide at_opt.

@UnixJunkie UnixJunkie self-assigned this May 4, 2015
@UnixJunkie
Copy link
Member Author

My current trial can be seen here:
UnixJunkie@3c13367

@UnixJunkie
Copy link
Member Author

the final proposal is here:
#616

@UnixJunkie
Copy link
Member Author

at_rank_exn was accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants