is there a way to set a variable depending on the ...
# announcements
s
is there a way to set a variable depending on the input, i.e.:
Copy code
val 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:
Copy code
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