title: How can I refactor two functions into one function that takes a generic argument?
body: <p>How can I refactor two functions into one function that has a generic parameter?</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>getVideo : Video -&gt; Post
  getVideo video =
      let
          (Video post) =
              video
      in
          post
  
  
  getPodcast : Podcast -&gt; Post
  getPodcast podcast =
      let
          (Podcast post) =
              podcast
      in
          post
  </code></pre>
  
  <p><strong>I would like to do something like this:</strong></p>
  
  <pre><code>getPodcast : 'a -&gt; Post
  getPodcast 'a =
      let
          ('a post) =
              'a
      in
          post
  </code></pre>
  
  <p><strong>Appendix:</strong></p>
  
  <pre><code>type Video
      = Video Post
  
  type Podcast
      = Podcast Post
  </code></pre>