def isPrefixOf(xs, ys):
    """
    isPrefixOf :: Eq a => [a] -> [a] -> Bool

    The isPrefixOf function takes two lists and returns True iff the first list
    is a prefix of the second.
    """
    return xs == ys[:len(xs)]