title: Binding of lambdas
body: <pre><code>def f(x):
      return x &lt;5
  [x for x in filter(lambda x: f(x), ls)]  #[0,1,2,3,4]
  def g(x):
      return lambda: x&lt;5
  [x for x in filter(lambda x: g(x), ls)]  # [0,1,2,3,4,5,6,7,8,9]
  def h(x):
      return lambda x=x: x&lt;5
  [x for x in filter(lambda x: h(x), ls)]  # [0,1,2,3,4,5,6,7,8,9]
  </code></pre>
  
  <p>Can anyone explain why g and h are not equivalent to f? 
  I think they should be equivalent because x in g and h should bind to the x in the environment that they are defined in (see this <a href="https://stackoverflow.com/questions/233673/lexical-closures-in-python">question on closures</a>)</p>