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

Enable retrieval of element in array/slice which is neither head nor tail. #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dihedron
Copy link

@dihedron dihedron commented May 3, 2023

It would be nice if the library provided a way to get an arbitrary element (given its index) out of an array/slice.
the funk.Head() and funk.Last() already provide almost all that is needed in order to get elements at index 0 and len(slice)-1.
I have added the trivial implementation of a funk.ElementAt(<slice>, index) function and its associated unit test.

@dihedron
Copy link
Author

dihedron commented May 3, 2023

I don't see why the checks fail, especially the Go lint one.

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

Successfully merging this pull request may close these issues.

None yet

1 participant