正在加载图片...
Higher-order functions Given function f return function fo f 入.X.f(fx) · How does this work? xf.2.f(fx)y+1)5 =(x、+)(x.y+1)×)5 (X.(y+1)(x+1)5 (入X.(x+1)+1)5 5+1+1=7Higher-order functions • Given function f, return function f ∘ f f. x. f (f x) • How does this work? (f. x. f (f x)) (y. y+1) 5 = (x. (y. y+1) ((y. y+1) x)) 5 = (x. (y. y+1) (x+1)) 5 = (x. (x+1)+1) 5 = 5+1+1 = 7
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有