Is it possible to convert from int to my Enum in Kotlin?I have the Enum:
enum class Rank(val value: Int) { UNITY(1), TEN(2), HUNDRED(3), THOUSAND(4) }
And I want to call something like:
val results = ints.mapIndexed { index, element -> getRomanDigit(element, Rank(ints.size - index)) }