User:Ruud Koot/Function composition
Appearance
compose :: (b -> c) -> (a -> b) -> (a -> c)
compose f g = \x -> f (g x)
def compose(f, g):
def nest(x):
return f(g(x))
return nest
compose :: (b -> c) -> (a -> b) -> (a -> c)
compose f g = \x -> f (g x)
def compose(f, g):
def nest(x):
return f(g(x))
return nest