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

Add First node for iterators #2761

Open
RunDevelopment opened this issue Apr 8, 2024 · 2 comments
Open

Add First node for iterators #2761

RunDevelopment opened this issue Apr 8, 2024 · 2 comments
Labels
enhancement New feature or request Node request

Comments

@RunDevelopment
Copy link
Member

Motivation
Sometimes it can be very useful to simply get the first element of an iterator.

Description
The node should behave as follows: It takes a single iterator and returns the first element returned by the iterator. If the iterator is empty, throw an error. The important property here is that the value returned by the node must not be iterated.

@joeyballentine
Copy link
Member

Isn't this basically what the limit input does on the iterators right now?

@RunDevelopment
Copy link
Member Author

Please read the description... The limit input restricts an iterator to the first n elements. The First node returns the first element of the iterator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Node request
Projects
None yet
Development

No branches or pull requests

2 participants