I don't think there's anything like that in the standard library.
j
jimn
12/04/2019, 1:32 PM
Copy code
tailrec fun deepArray(it: Any?): Any? =
if (it is Array<*>) it.map(::deepArray).toTypedArray()
else if (it is Iterable<*>) deepArray(it.map { it }.toTypedArray())
else it