+
Skip to content

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.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载