Anonymous function: Difference between revisions

Content deleted Content added
m Sorting: Typo
No edit summary
Line 29:
</source>
 
The anonymous function accepts two argumentarguments &mdash; x & y &mdash; and returns the comparison between them using the built-in function cmp().
Another example would be sorting a list of strings by length of the string: