Composition of functions. #320
Working snapshot of #322.