Esa
08/20/2020, 11:36 AMIterable<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.Marc Knaup
08/20/2020, 12:54 PMNotNull
in a flatMap
scenario? You can just return emptyList()
to make it a no-op.Esa
08/20/2020, 1:22 PMilya.gorbunov
08/20/2020, 1:23 PMvalidateFold
looks much like zipWithNext
to me, or at least can be achieved with that.