This language bar is your friend. Select your favorite languages!

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.

#Edit dateEdit SummaryEditor
👁 Δ 52 2019-10-14, 12:23 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 51 2019-09-27, 09:52 [PHP] Fix explanation box (bad underscore) ancarda
👁 Δ 50 2019-09-27, 09:52 [PHP] Format code snippet to PSR-12, use single quotes for higher performance ancarda
👁 Δ 49 2019-09-26, 19:04 [Kotlin] because I didn't read the instructions zr8c
👁 Δ 48 2019-09-26, 19:03 New Kotlin implementation by user [zr8c] zr8c
👁 Δ 47 2019-09-26, 17:04 New Java implementation by user [Canem Inops ] Canem Inops
👁 Δ 46 2019-09-26, 16:02 New Lisp implementation by user [foobar] foobar
👁 Δ 45 2019-07-03, 16:05 New Haskell implementation by user [morteako] morteako
👁 Δ 44 2019-03-26, 21:17 [Clojure] No need for sample values programming-idioms.org
👁 Δ 43 2019-02-16, 17:39 New Clojure implementation by user [Alexander] Alexander
👁 Δ 42 2018-02-14, 15:39 [Elixir] Simpler implementation mru2
👁 Δ 41 2018-02-14, 12:52 [Go] gofmt programming-idioms.org
👁 Δ 40 2017-06-02, 15:59 New C implementation by user [Dodopod] Dodopod
👁 Δ 39 2017-04-29, 06:51 [Rust] Fixed demo link TheVTM
👁 Δ 38 2017-04-27, 11:02 New Rust implementation by user [TheVTM] TheVTM
👁 Δ 37 2017-02-23, 12:12 New Go implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 36 2016-12-18, 02:55 [PHP] Less code programming-idioms.org
👁 Δ 35 2016-12-11, 21:15 [Java] Property name is p. +DocURL programming-idioms.org
👁 Δ 34 2016-12-11, 20:49 [Java] Property name is p. +DocURL programming-idioms.org
👁 Δ 33 2016-12-11, 20:45 [Go] this is not an idiomatic name, choosing s instead. programming-idioms.org
👁 Δ 32 2016-12-11, 20:41 Trying to clarify Item/items. programming-idioms.org
👁 Δ 31 2016-02-18, 17:21 Restored version 29
👁 Δ 30 2016-02-18, 16:57 New Csharp implementation by user [javasucks]
👁 Δ 29 2016-02-18, 15:37 [PHP] matching naming conventions
👁 Δ 28 2016-02-18, 15:34 New PHP implementation by user [nvius]
👁 Δ 27 2016-02-17, 16:25 New Ada implementation by user [Smaehtin]
👁 Δ 26 2016-02-17, 11:15 New Csharp implementation by user [javasucks]
👁 Δ 25 2016-02-16, 21:58 New Scala implementation by user [meshelton]
👁 Δ 24 2016-02-16, 18:34 New Cpp implementation by user [GhassanPL]
👁 Δ 23 2016-02-16, 17:07 New Lua implementation by user [jparoz]
👁 Δ 22 2015-12-22, 15:40
👁 Δ 21 2015-11-30, 12:37
👁 Δ 20 2015-10-29, 14:05
👁 Δ 19 2015-09-04, 12:36
👁 Δ 18 2015-09-03, 15:28
👁 Δ 17 2015-09-03, 15:17
👁 Δ 16 2015-09-03, 13:44
👁 Δ 15 2015-08-24, 00:10
👁 Δ 14 2015-08-23, 10:19
👁 Δ 13 2015-08-21, 16:27
👁 Δ 12 2015-08-20, 16:31
👁 Δ 11 2015-08-20, 10:21
👁 Δ 10 2015-08-01, 01:19
👁 Δ 9 2015-08-01, 01:16
👁 Δ 8 2015-08-01, 01:14
👁 Δ 7 2015-07-31, 19:31
👁 Δ 6 2015-05-06, 21:04
👁 Δ 5 2015-04-21, 07:25
👁 Δ 4 2015-04-21, 07:25
👁 Δ 3 2015-04-07, 14:13
👁 Δ 2 2015-04-07, 14:07
1 2015-04-07, 14:06