title: Duplicate each element in a Haskell List
body: <p>by functions 
  How can I duplicate every element of a list with itself twice. e.g. duplicate <code>[1,3,5]</code> should return <code>[1,1,3,3,5,5]</code> ?</p>
  
  <p>and replace an element by some other element in a list. e.g. replace 3 30 <code>[1, 3 ,4 ,5, 3, 4]</code> should return <code>[1, 30, 4, 5, 30, 4]</code></p>
  
  <p>I'm quite new in Haskell and need to submit a homework today.</p>
  
  <p>Any help would be greatly appreciated !</p>