title: Generalize the function
body: <p>I am learning haskell and try to understand what does generalization mean in the functional programming. </p>
  
  <p>Consider follow code snippet:</p>
  
  <pre><code>twiceLifted :: (Functor f1, Functor f) =&gt;
                 f (f1 a) -&gt; f (f1 Char)
  twiceLifted = (fmap . fmap) replaceWithP
  
  twiceLifted' :: [Maybe String] -&gt; [Maybe Char]
  twiceLifted' = twiceLifted
  </code></pre>
  
  <p>As you can see, the first function has not concrete type, functor has to be implemented.  </p>
  
  <p>The second function looks more interesting. It reused the first function, but it has a concrete type.<br>
  So first function build the ground for the second function.<br>
  Is that what generalization in functional programming all about, reused something that already exists and build on top of it?</p>