lua-users home
lua-l archive

Re: Another example for syntactically lightweight closures

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 8 Feb 2008, at 01:13, Mark Hamburg wrote:
Or:
 table.sort( t, | a, b | a.field < b.field )
Or:
	t:sort |a,b| a.field < b.field
A more elaborate example:
	t :where |x| x.shoesize > 7 :sort |a,b| a.age < b.age :print
-jcw

AltStyle によって変換されたページ (->オリジナル) /