Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun others(students: List<Student>) {
- val mappedById = students.associateBy { it.id }
- val groupedByAge = students.groupBy { it.age }
- }
- data class Student(val id: Int, val name: String, val age: Int)
Add Comment
Please, Sign In to add comment