#* http://rosettacode.org/wiki/Functional_Composition
  Create a function which works like: compose(f, g) (x) = f(g(x))
*#

compose = { f, g | { x | f g x } }

#Test
add1 = { x | x + 1 }
double = { x | x * 2 }
b = compose(->double ->add1)
p b 1 #should print 4