Programming-Idioms

History of Idiom 28 > diff from v16 to v17

Edit summary for version 17 :

Version 16

2015-09-03, 13:44:44

Version 17

2015-09-03, 15:17:21

Idiom #28 Sort by a property

Sort elements of array-like collection items in ascending order of x.p, where p is a field of type Item of the objects in items.

Idiom #28 Sort by a property

Sort elements of array-like collection items in ascending order of x.p, where p is a field of type Item of the objects in items.

Code
sortBy (comparing p) items