Conversion for the logger

Report a typo

You have a logger function defined as:

def logger(message: String): Unit = println(s"DEBUG: $message")

Fix the conversion function so that the following code compiles:

val clientAge: Int = 42
val clientName: String = "Max"
val client = (clientAge, clientName)

logger(client)

Expected output of your conversion: clientName: clientAge.

Sample Input 1:

5 Max

Sample Output 1:

DEBUG: Max: 5
Write a program in Scala 3
given Conversion[TYPE_IN, TYPE_OUT] with
def apply(in: TYPE_IN): TYPE_OUT = ???
___

Create a free account to access the full topic