title: How to create lambda from lambda with parameter without doing .call in Ruby?
body: <p>I want to create a new lambda taking no arguments from lambda taking one.</p>
  
  <p>Say, I have</p>
  
  <pre><code>irb(main):001:0&gt; f1 = lambda { |p| p }
  =&gt; #&lt;Proc:0x00000001045190@(irb):1 (lambda)&gt;
  irb(main):002:0&gt; f1.call(2)
  =&gt; 2
  </code></pre>
  
  <p>and now I</p>
  
  <pre><code>irb(main):003:0&gt; f2 = lambda { f1.call(2) }
  =&gt; #&lt;Proc:0x00000000f620e8@(irb):3 (lambda)&gt;
  irb(main):004:0&gt; f2.call
  =&gt; 2
  </code></pre>
  
  <p>but I do not want to create a lambda around first one but want to "substitute" parameter for it or something.</p>
  
  <p>May be if we have <code>call</code>, there is some magic that do the same thing as call, but returns a lambda except of actually calling the code:</p>
  
  <pre><code>f2 = f1.some_magic(2)
  f2.call
  =&gt; 2
  </code></pre>
  
  <p>P.S. Sorry if this question is dumb, this functional stuff is hard to understand to me sometimes.</p>
  
  <p>P.P.S. Found <a href="http://www.ruby-forum.com/topic/173699" rel="nofollow">this topic</a> on ruby-forum.com, and it seems I want to do the same things without unnecessary calls overhead. </p>