Function composeInvariant

Compose an Invariant instance by nesting a pair of Invariantss, the first on the outside and the second on the inside.