-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Analogous to the JDK method java.lang.Stream#peek(java.util.function.Consumer) introduce a peek extension method for Iterable and Iterator. This method just consumes an element and produces an Iterable/Iterator providing the same elements as the source. This method is mainly interesting for debugging purposes.
-
static def <T> Iterable<T> peek(Iterable<T> iterable, (T)=>void action) -
static def <T> Iterator<T> peek(Iterator<T> iterator, (T)=>void action)
If you want this ticket to be implemented, please give feedback, since it is only implemented on demand.
Reactions are currently unavailable