title: const function in Haskell
body: <p>The function <code>const</code> is defined in Prelude as:</p>
  
  <pre><code>const x _ = x
  </code></pre>
  
  <p>In GHCi, when I tried</p>
  
  <pre><code>Prelude&gt; const 6 5  -&gt; Gives 6
  </code></pre>
  
  <p>But when I tried</p>
  
  <pre><code>Prelude&gt; const id 6 5 -&gt; Gives 5
  </code></pre>
  
  <p>Even after making changes like</p>
  
  <pre><code>Prelude&gt; (const id 6) 5 -&gt; Gives 5
  </code></pre>
  
  <p>Shouldn't this function give <code>6</code> as the output of function <code>id</code> has type <code>id :: a -&gt; a</code> which should bind like</p>
  
  <pre><code>Prelude&gt; (const 6) 5 -&gt; Gives 6
  </code></pre>
  
  <p>Why does function <code>const</code> behave differently?</p>