added version of equal that takes sequences of two different types