amalgamate function

Group components of a composition