Skip to content

compose

TurtleKitty edited this page May 12, 2019 · 2 revisions

compose

Compose functions together.

(proc f (xs)
   (map (_ (* _ _)) xs))

(proc g (xs)
   (map (_ (+ _ 10)) xs))

((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