import Test.QuickCheck
import Data.List

myDuplicate :: [a] -> [a]
myDuplicate xs = concatMap (\x -> [x, x]) xs

testMyDuplicate :: [Int] -> Bool
testMyDuplicate xs = (length . myDuplicate $ xs) == (2 * length xs)
	&& (concat [[x, x] | x <- xs]) == (myDuplicate xs)

main = quickCheck testMyDuplicate
