I want to "translate" a list of numbers (range -999, 999) into a list of strings in Scala:
The function:
def translate(listofnumbers: List[Int]): List[String] = {
I want to solve this Problem without using mk.String.
I tried to use pattern matching
def testList( x: Int) = x match{
case 1 => println("one")
but I don't know how I can combine cases for numbers like 12, 103 etc.
The Result should look like this Example:
println(translate(List(1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)))
and get
List(one,two,three,four,five,six......)