Skip to content

compose

Turtle Kitty edited this page Aug 9, 2015 · 1 revision

compose

Compose functions together.

(fun f (xs) (xs.map (_ (* _ _))))
(fun g (xs) (xs.map (_ (+ _ 10))))

((compose f g range) 1 7)
    -> (121 144 169 196 225 256 289)

((compose g f range) 1 7)
    ->(11 14 19 26 35 46 59)
Clone this wiki locally