Hi there, I have a couple of extension functions f...
# stdlib
e
Hi there, I have a couple of extension functions for 
Iterable<T>
 that has been very useful to me personally, and I wish to make a contribution to the stdlib with those. 🙂 I read through this link and was suggested to make my plans known to #kontributors, however they sent me here. So here's what the functions are basically:
list.validatedFold
 - this is a function that iterates through the elements of an ordered list, and verifies that elements 
n
 and 
n+1
 pass some validation function. returns true if all elements pass, or false on the first element that does not pass (early return).
list.flatMapIndexedNotNull
 - essentially what the name says, it was relevant for me in one case and I didn't find it in the stdlib.
Do you think these are appropriate contributions?
m
Why would you need
NotNull
in a
flatMap
scenario? You can just return
emptyList()
to make it a no-op.
e
That's fair. I can skip that one as it can be achieved in the other way that you suggested.
i
validateFold
looks much like
zipWithNext
to me, or at least can be achieved with that.