Thanks for your reply. I tried a few ways but none worked.One is like: shorter as bs = f id id as bs wheref ca cb [] _ = ca [] f ca cb _ [] = cb []f ca cb (a:as) (b:bs) = f (ca.(a:)) (cb.(b:)) as bs
However this will result in a non-terminating loop for shorter [1..] [2..],since the f
Hi all,I'm trying to implement a function that returns the shorter one of two given lists,something likeshorter :: [a] -> [a] -> [a]such that shorter [1..10] [1..5] returns [1..5],and it's okay for shorter [1..5] [2..6] to return either.
Simple, right?However, it becomes difficult when deali