I often want function that generates an infinite l...
# advent-of-code
k
I often want function that generates an infinite list of incrementing numbers, but I keep forgetting about
generateSequence
!
o
infinite? 😉
k
Well it's mostly for AoC our code barely compiles usually.
Ah this is the #advent-of-code channel too, great.
Are you doing the challenges too?
o
Nope, too lazy 🙂
Also I have a list of hobbies I want to pay attention to, and even there I can’t find enough time
k
Just enjoying our struggles then 😉
o
Sure, like football, but much more interesting!
Also I think it can be extremely useful for when K/N goes to improve performance of compiled code. Lots of algorithms which are mostly pure Kotlin and thus suitable (or even already done) as multiplatform. Identifying performance problems on various platforms will be much more easier and use-case driven.
👍 2
k
I'm not ready to write K/N yet, I need my treesets and arraydequeues!
o
That’s another good point to consider 😉
I.e. what’s missing in common libs (stdlib, mostly)
k
Wow that's great! It even has the primitive things like
IntIntMap
, then you don't need to feel bad about boxing!
o
I didn’t check the quality and performance of collections, so I don’t know