unsnoc

open fun S.unsnoc(): Pair<S, A>?

Deconstruct an S between its init and last element.