Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- myFunc :: [Int] -> [Int] -> [Int]
- myFunc [] [] = []
- myFunc [] (x:xs) = (myFunc [] (filter (<x) xs)) ++ (filter (==x) (x:xs)) ++ (myFunc [] (filter (>x) xs))
- myFunc l1 l2 = myFunc [] (l1 ++ l2)
- main :: IO ()
- main = do
- print (myFunc l1 l2)
- where
- l1 = [1, 7, 5]
- l2 = [6, 1, 2, 4]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement