Find by IP

Report a typo

We have a function that prints a message and some additional information:

def log(message: String)(meta: String): Unit =
  println(s"$message, $meta")

Write a conversion function so that we can pass the IP to the log function as follows:

// Your function is here

val ip = (169, 100, 0, 1)
log("New registration")(ip)

At the same time, the console must print:

New registration, ip:169.100.0.1

Sample Input 1:

169 100 0 1

Sample Output 1:

New registration, ip:169.100.0.1
Write a program in Scala
object Main {
// write the code here
}

Create a free account to access the full topic