Loading your workspace…
A focused source example using data classes, filtering, and safe defaults.
Choose a file to explore. Copy it into your own project when you’re ready.
data class Note(val id: Long, val title: String, val done: Boolean = false)
fun pending(notes: List<Note>): List<Note> = notes.filterNot { it.done }