<@U0A97FVU2>: for your algorithm: ``` var tai...
# announcements
a
@mplatvoet: for your algorithm:
Copy code
var tail = head.get()
    while (true) {
        val next = tail.next
        if (next == null) {
            return tail
        }
        tail = next
    }
isn’t that just:
Copy code
generateSequence(head.get(), { it.next }).last()
or:
Copy code
var tail = head.get()
    while (true) { tail = tail.next ?: return tail }