What will be the idiomatic way of creating a mutable list of a given length n with repeating elements of v (for example, listOf(4,4,4,4,4) ) as an expression.
I am doing val list = listOf((0..n-1)).flatten().map{v} , but it can only create an immutable list.
list kotlin
Basel shishani
source share