-- Write code which takes two lists as input and decides whether list1 if a prefix of list2, meaning list2 begins exactly with list1. The top-level function must have the type declaration isPrefix :: Eq a => [a] -> [a] -> Bool isPrefix :: Eq a => [a] -> [a] -> Bool isPrefix [] [] = True isPrefix xs [] = False isPrefix [] ys = True isPrefix (x:xs) (y:ys) | x == y = isPrefix xs ys | otherwise = False