title: Functors - Are they used to make Operator Overloading more easy?
body: <p>The below piece of code is very common to implement Min-Heap :</p>
  
  <pre><code>struct comparator
  {
      bool operator() ( int i, int j)
      { return j &lt; i; }
  };
  
  priority_queue&lt;int, std::vector&lt;int&gt;, comparator&gt; minHeap;
  </code></pre>
  
  <p>How Functors work? 
  What purpose they solve in C++?
  I could see Functors are more often used to Overload comparison.
  Are they just used to make Operator Overloading easy?</p>
  
  <p>When to create Functors?
  How to create our own functor?</p>