title: How lambda function in takeOrdered function works in pySpark?
body: <p>I can't quite get the behavior of lambda in following code:</p>
  
  <pre><code>rdd = sc.parallelize([5,3,1,2)]
  rdd.takeOrdered(3,lambda s: -1*s)
  </code></pre>
  
  <p>From what I have understood, lambda applies an operation to all elements in a list, so I expected above code to return</p>
  
  <pre><code>[-1,-2,-3]
  </code></pre>
  
  <p>But it returned</p>
  
  <pre><code>[5,3,2]
  </code></pre>
  
  <p>What am I missing here?</p>