Created
June 26, 2014 12:11
-
-
Save lnicola/ca5ce6126bb619c5f038 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| mergeUniq (x : xs) (y : ys) = if x < y | |
| then x : mergeUniq xs (y : ys) | |
| else if y < x | |
| then y : mergeUniq (x : xs) ys | |
| else x : mergeUniq xs ys | |
| mergeUniq xs [] = xs | |
| mergeUniq [] ys = ys | |
| mult n = map (* n) [1..] | |
| ans = mult 2 `mergeUniq` mult 3 `mergeUniq` mult 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment