/ Published in: Haskell
problem 14, Duplicate the elements of a list
> dupli [1, 2, 3]
[1,1,2,2,3,3]
> dupli [1, 2, 3]
[1,1,2,2,3,3]
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
dupli :: [a] -> [a]
URL: http://haskell.org/haskellwiki/99_questions/11_to_20