Logo

Programming-Idioms

History of Idiom 100 > diff from v12 to v13

Edit summary for version 13 by :
New D implementation by user [piou]

Version 12

2015-12-30, 16:58:40

Version 13

2016-01-09, 17:27:24

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Imports
import std.algorithm: sort;
Code
items.sort!c;
Doc URL
http://dlang.org/phobos/std_algorithm_sorting.html#.sort