Function composing feeds the output of one function to the input of another function. Look at the implementation of compose and select the correct result of code execution
def compose[A, B, C](f: B => C, g: A => B): A => C =
a => f(g(a))
def f(b: Int): Int = b / 2
def g(a: Int): Int = a + 2
compose(f, g)(2)
compose(g, f)(2)
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати