Shawn Karber_
06/15/2020, 9:48 PMval aFlags = (1, 2)
val bFlags = (2, 3)
val cFlags = (3, 4)
val dFlags = (4, 5)
fun processInput(letter: Char) {
return letterFlags
}
The use case is I have a lot of different data I need to process, and the flags to compare it depend on the value the user is passing in. For instance the user would call:
processInput('a', their data)
Then my function would grab the list of flags using the variable name aFlags
and process their data that way. I know I could use a when statement, for instance, to do it, but I was just wondering if kotlin had a way to get member references that way