', 'two', 'four']a.sort(lambda x,y: cmp(len(x), len(y)))print a['two', 'four', 'three']
示例.
Python.Python用lambda语法定义匿名函数，只需用表达式而无需声明def f(x):lambda x: x * x
JavaScript.JavaScript支持匿名函数。alert((function(x){})(10));