I know that a standard way would be
(Eq z) => matchLists :: [x] -> [x] -> Bool
matchLists xs ys = xs == ys
But I have a special matching function for element which is passed from the outside and I have no control over it.
So what I am looking for is
matchLists :: (x -> x -> Bool) -> [x] -> [x] -> Bool
(Hoogle says no)
Would you end up with a custom function with a signature like this or what would you do instead?
EDIT:
zip functions don't do what I need since the resulting list has the minimal length out of 2 input lists
EDIT:
What do you think of this?
--matchListsWith :: (a -> a -> Bool) -> [a] -> [a] -> Bool
matchListsWith :: (a -> b -> Bool) -> [a] -> [b] -> Bool
matchListsWith _ [] [] = True
matchListsWith _ (_:_) [] = False
matchListsWith _ [] (_:_) = False
matchListsWith matcher (x:xs) (y:ys) = matcher x y && matchListsWith matcher xs ys