Variation on function composition.