<https://kotlinlang.org/api/latest/jvm/stdlib/kotl...
# getting-started
d
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/windowed.html maybe this will do what you want? Otherwise consider non-FP solutions, they are easier to read for some kinds of problems.
z
will check thanx
ah no. it is usefull too but i just need to check the existence... not full real sublist
fo me would be enough if fold has some kind of shortcut out of the loop 🙂
h
I guess you can't do a break from it? I've wished I could break out of
List.forEach{}
as well
z
🙂
h
could you just not write it as a function and use return to break out of it?
z
well i am bit new to FP and its declarative nature which I like and so i go to extrme to get used to it and to see "limits"