Is there a convenient way to convert a function with type Int => Seq[Int] to Seq[Int => Int] in scala? For example:
val f = (x: Int) => Seq(x * 2, x * 3)
I want to convert it to
val f = Seq((x: Int) => x * 2, (x: Int) => x * 3)
Is there a convenient way to convert a function with type Int => Seq[Int] to Seq[Int => Int] in scala? For example:
val f = (x: Int) => Seq(x * 2, x * 3)
I want to convert it to
val f = Seq((x: Int) => x * 2, (x: Int) => x * 3)