chaiNNer-org/chaiNNer

Add First node for iterators

RunDevelopment opened this issue · 2 comments

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.

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

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.