without a map, just iterating: ``` fun from...
# getting-started
a
without a map, just iterating:
Copy code
fun fromId(id: Int): ABCEnum = values().find { it.id == id } ?: throw IllegalArgumentException("Invalid ID")