Colton Idle
11/30/2021, 3:50 AMephemient
11/30/2021, 3:57 AMlist.sortedBy { it.type == STUDENT }
since false < true
val (students, others) = list.partition { it.type == STUDENT }
others + students
is more or less your approach but built into stdlibColton Idle
11/30/2021, 4:03 AMephemient
11/30/2021, 4:08 AMColton Idle
11/30/2021, 4:12 AMephemient
11/30/2021, 4:12 AMColton Idle
11/30/2021, 4:13 AMephemient
11/30/2021, 4:14 AMursus
11/30/2021, 8:40 PM