title: partial applied function in the recursion
body: <p>I am beginner in Haskell. I wrote a function, which applies another function several times to the argument:</p>
  
  <pre><code>frepeat :: (Integral n) =&gt; n -&gt; (a -&gt; a) -&gt; a -&gt; a
  frepeat n f a
      | n &lt;= 0 = error "Invalid count."
      | n == 1 = f a
      | otherwise = f (frepeat (n-1) f a)
  </code></pre>
  
  <p>It works:</p>
  
  <pre><code>ghci&gt; frepeat 3 (^2) 2
  256
  ghci&gt; frepeat 4 (++ "-bla") "bla"
  "bla-bla-bla-bla-bla"
  </code></pre>
  
  <p>Now I want rewrite it <em>more compactly</em>, without the last argument. I want - it must to be a partial applied function. I tried this:</p>
  
  <pre><code>frepeat :: (Integral n) =&gt; n -&gt; (a -&gt; a) -&gt; a -&gt; a
  frepeat n f
      | n &lt;= 0 = error "Invalid count."
      | n == 1 = f
      | otherwise = f (frepeat (n-1) f)
  </code></pre>
  
  <p>But GHCi doesn't eat it... Does it mean I can't do it?</p>