A utility function to get the type of a value
Compare items in two sequences to find a longest common subsequence