Avoid stack-overflow.

When trying to compose(a,b), if no such composition is defined then
we should give an error instead of overflowing the stack.
Merge pull request #48 from jneem/compose

Avoid stack-overflow.