Skip to content

Commit a1bbc1b

Browse files
myronmarstonjosevalim
authored andcommitted
Document change in behavior of Enum.group_by ordering. (#4794)
On 1.2, here's how `group_by` behaved: iex(1)> 1..10 |> Enum.group_by(fn i -> i < 5 end) %{false: [10, 9, 8, 7, 6, 5], true: [4, 3, 2, 1]} On 1.3, here's how it behaves: iex(1)> 1..10 |> Enum.group_by(fn i -> i < 5 end) %{false: [5, 6, 7, 8, 9, 10], true: [1, 2, 3, 4]}
1 parent 18dfca2 commit a1bbc1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ By restricting hierarchies in favor of named setups, it is straight-forward for
283283
* [CLI] Add `--logger-otp-reports BOOL` and `--logger-sasl-reports BOOL` switches
284284
* [Compiler] Emit a summary of compilation errors when modules are missing
285285
* [Enum] Add `Enum.group_by/3` that allows developers to map on the value being grouped
286+
* [Enum] Make list values in maps returned by `Enum.group_by/2` and `Enum.group_by/3` preserve the order of the input enumerable instead of reversing it.
286287
* [Enum] Add `Enum.drop_every/2` that drops every `nth`, including the first one
287288
* [Exception] Suggest possible functions on `UndefinedFunctionError` for existing modules
288289
* [Exception] Warn if unknown fields are given to `raise/2`

0 commit comments

Comments
 (0)