Discrete and continuous compositions