define compose for applicative functors