Logo

Programming-Idioms

History of Idiom 28 > diff from v79 to v80

Edit summary for version 80 by tfel:
New Smalltalk implementation by user [tfel]

Version 79

2021-08-16, 03:37:16

Version 80

2021-09-24, 08:57:49

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 the 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 the type Item of the objects in items.

Variables
items,x,p
Variables
items,x,p
Code
items sorted: [:x :y | x p <= y p].