I am very new to Korlin programming. I have written this block of code
// attendanceJson: Array<AttendanceJson>
val list = attendanceJson
.map { i ->
{
val o = StudentAttendance()
o.attendanceStatus = i.i
o.student = studentService.findById(i.t)
}
}.toSet()
which return list of Function()<Kotlin.Unit>
. But I need Set of StudentArrendance. DOC said toSet()
function will return given type of Set
.
How to do this ? And what is Function()<Kotlin.Unit>
, and what is the purpose ?