https://kotlinlang.org logo
#feed
Title
# feed
d

Dmitry Kandalov

11/10/2020, 3:45 PM
Following the recent Global Day of Coderetreat, @dmcg and I paired on Conway’s Game of Life using Kotlin (obviously) and test-and-commit-or-revert workflow (aka TCR, to make the process more exciting 😅)

https://www.youtube.com/watch?v=NzJM83ezcQw

👏 3
n

Nikky

11/13/2020, 11:57 AM
Sequence implements Interface so
next(): T
your messing with
take(1)
and
listOf
in part 2 made me feel pain apart from that.. wonderful
👍 1
🤦 1
d

dmcg

11/13/2020, 12:57 PM
Yeah I’ve been bitten by take not doing what I expect
d

Dmitry Kandalov

11/13/2020, 4:39 PM
@Nikky do you mean
sequence.iterator()
function? I don’t think you can do
.next()
directly on a sequence.
n

Nikky

11/13/2020, 4:42 PM
i guess that is true.. i think i have a extension locally and forgot thats not stdlib
Copy code
fun <T> Sequence<T>.next(): T = take(1).first()
4 Views