If early exit is not required, something like this...
# announcements
o
If early exit is not required, something like this:
Copy code
val a = listOf("a")
    val b = listOf("A")
    a.size == b.size && a.foldIndexed(true) { index: Int, acc: Boolean, s: String -> acc && b[index].equals(s, true)}
i
orangy: Note that this will fail if a is longer than b
o
indeed, length check should come first
also, original question had
Collection
, not
List
😕