-
-
Save aluink/3842191 to your computer and use it in GitHub Desktop.
In Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merge :: Ord a => [a] -> [a] -> [a] | |
merge [] l2 = l2 | |
merge l1 [] = l1 | |
merge xx@(x:xs) yy@(y:ys) = if x < y then x : merge xs yy | |
else y : merge xx ys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment