Module

Enum

Changes by version

Elixir 1.19.0

· 2 changes

Enhancement Tool: Elixir

Provide more information on Enum.OutOfBoundsError

Bugfix Tool: Elixir

Fix infinite loop on Enum.take/2 with negative index on empty enumerable

Elixir 1.16.0

· 1 change

Hard Deprecation Tool: Elixir

Deprecate passing a range with negative step on Enum.slice/2, give first..last//1 instead

Elixir 1.14.0

· 2 changes

Enhancement Tool: Elixir

Allow slicing with steps in Enum.slice/2

Bugfix Tool: Elixir

Allow slices to overflow on both starting and ending positions

Elixir 1.13.0

· 2 changes

Enhancement Tool: Elixir

Optimize Enum.concat/1 for lists of lists

Enhancement Tool: Elixir

Add Enum.slide/3

Elixir 1.12.2

· 1 change

Enhancement Tool: Elixir

Optimize Enum.into/3 and Map.new/2

Elixir 1.12.0

· 4 changes

Enhancement Tool: Elixir

Add Enum.count_until/2 and Enum.count_until/3

Enhancement Tool: Elixir

Add Enum.product/1

Enhancement Tool: Elixir

Add Enum.zip_with/2, Enum.zip_with/3, Enum.zip_reduce/3, and Enum.zip_reduce/4

Enhancement Tool: Elixir

Add support for functions as the second argument of Enum.with_index/2

Elixir 1.11.0

· 1 change

Enhancement Tool: Elixir

Allow a sorting function on Enum.min_max_by/3,4, including the new compare/2 conventions

Elixir 1.10.0

· 5 changes

Enhancement Tool: Elixir

Speed up getting one random element from enumerables

Enhancement Tool: Elixir

Add Enum.frequencies/1, Enum.frequencies_by/2, and Enum.map_intersperse/2

Enhancement Tool: Elixir

Allow a sorting function on Enum.min/max/min_by/max_by

Enhancement Tool: Elixir

Add asc/desc and compare/1 support to Enum.sort/2

Bugfix Tool: Elixir

Allow positive range slices on infinite streams given to Enum.slice/2

Elixir 1.9.0

· 1 change

Bugfix Tool: Elixir

Ensure the first equal entry is returned by Enum.min/2 and Enum.max/2

Elixir 1.8.0

· 1 change

Enhancement Tool: Elixir

Passing a non-empty list to Enum.into/2 was inconsistent with maps and is deprecated in favor of Kernel.++/2 or Keyword.merge/2

Elixir 1.7.0

· 1 change

Enhancement Tool: Elixir

Enum.chunk/2/3/4 is deprecated in favor of Enum.chunk_every/2/3/4 - notice chunk_every does not discard incomplete chunks by default

Elixir 1.6.1

· 1 change

Bugfix Tool: Elixir

Reintroduce zipping of any enumerable of enumerables in Enum.zip/1 (regression in v1.6.0)

Elixir 1.6.0

· 1 change

Enhancement Tool: Elixir

Enum.partition/2 is deprecated in favor of Enum.split_with/2

Elixir 1.5.3

· 1 change

Bugfix Tool: Elixir

Fix chunk_every/4 when step > count

Elixir 1.5.0

· 3 changes

Enhancement Tool: Elixir

Add Enum.chunk_by/4 and Stream.chunk_by/4

Enhancement Tool: Elixir

Add Enum.chunk_every/2 and Enum.chunk_every/4 with a more explicit API than Enum.chunk/2 and Enum.chunk/4

Enhancement Tool: Elixir

Deprecate Enum.filter_map/3 in favor of Enum.filter/2 + Enum.map/2 or for-comprehensions

Elixir 1.4.0

· 5 changes

Enhancement Tool: Elixir

Add Enum.map_every/2 that invokes the given function with every nth item

Enhancement Tool: Elixir

Add min/2, max/2, min_max/2, min_by/3, max_by/3, and min_max_by/3 that allow a function specifying the default value when the enumerable is empty

Enhancement Tool: Elixir

Introduce Enum.zip/1 to zip multiple entries at once

Enhancement Tool: Elixir

Enum.partition/2 has been deprecated in favor of Enum.split_with/2

Enhancement Tool: Elixir

Deprecate Enum.uniq/2 in favor of Enum.uniq_by/2

Elixir 1.3.2

· 1 change

Bugfix Tool: Elixir

Return nil if enumerable halts in Enum.find_index/3

Elixir 1.3.0

· 4 changes

Enhancement Tool: Elixir

Add Enum.group_by/3 that allows developers to map on the value being grouped

Enhancement Tool: Elixir

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.

Enhancement Tool: Elixir

Add Enum.drop_every/2 that drops every nth, including the first one

Enhancement Tool: Elixir

Passing a dictionary to Enum.group_by/3 is deprecated

Elixir 1.2.0

· 2 changes

Enhancement Tool: Elixir

Use the faster and auto-seeding :rand instead of :random in Enum.shuffle/1 and Enum.random/1 and Enum.take_random/2

Enhancement Tool: Elixir

Add Enum.with_index/2

Elixir 1.1.1

· 1 change

Enhancement Tool: Elixir

Fix non-integer member checks with ranges

Elixir 1.1.0

· 3 changes

Enhancement Tool: Elixir

Add Enum.random/1, Enum.take_random/2, Enum.min_max/1, Enum.min_max_by/2, Enum.reverse_slice/3, Enum.reduce_while/3, Enum.dedup/1 and Enum.dedup_by/2

Enhancement Tool: Elixir

Inline common map usage in Enum functions for performance

Enhancement Tool: Elixir

Enum.uniq/2 is deprecated in favor of Enum.uniq_by/2

Elixir 1.0.5

· 1 change

Enhancement Tool: Elixir

Ensure Enum.take/2 does not consume one extra item when halting on the last emittable item

Elixir 0.14.3

· 1 change

Enhancement Tool: Elixir

Add Enum.sort_by/3

Elixir 0.14.2

· 1 change

Enhancement Tool: Elixir

Improve performance of Enum.join/2 and Enum.map_join/3 by using iolists

Elixir 0.14.1

· 1 change

Enhancement Tool: Elixir

Enum.slice/2 and Enum.slice/3 always returns a list (and never nil)

Elixir 0.13.3

· 1 change

Enhancement Tool: Elixir

Fix Enum.join/2 and Enum.map_join/3 for empty binaries at the beginning of the collection

Elixir 0.13.0

· 1 change

Enhancement Tool: Elixir

Add Enum.group_by/2, Enum.into/2, Enum.into/3, Enum.traverse/2 and Enum.sum/2

Elixir 0.12.2

· 2 changes

Enhancement Tool: Elixir

Add Enum.flat_map_reduce/3

Enhancement Tool: Elixir

Deprecate Enum.first/1 in favor of Enum.at/2 and List.first/1

Elixir 0.12.0

· 6 changes

Enhancement Tool: Elixir

Fix bug in Enum.chunk/4 where you'd get an extra element when the enumerable was a multiple of the counter and a pad was given

Enhancement Tool: Elixir

Enumerable.count/1 and Enumerable.member?/2 should now return tagged tuples. Please see Enumerable docs for more info

Enhancement Tool: Elixir

Deprecate Enum.chunks/2, Enum.chunks/4 and Enum.chunks_by/2 in favor of Enum.chunk/2, Enum.chunk/4 and Enum.chunk_by/2

Enhancement Tool: Elixir

Behaviour of Enum.drop/2 and Enum.take/2 has been switched when given negative counts

Enhancement Tool: Elixir

Behaviour of Enum.zip/2 has been changed to stop as soon as the first enumerable finishes

Enhancement Tool: Elixir

Enumerable.reduce/3 protocol has changed to support suspension. Please see Enumerable docs for more info

Elixir 0.11.0

· 2 changes

Enhancement Tool: Elixir

Add Enum.slice/2 with a range

Enhancement Tool: Elixir

Document and enforce Enum.member?/2 to use the match operator (===)

Elixir 0.10.3

· 1 change

Enhancement Tool: Enhancements

Add Enum.take_every/2

Elixir 0.10.2

· 4 changes

Enhancement Tool: Elixir

Add Enum.split/2, Enum.reduce/2, Enum.flat_map/2, Enum.chunks/2, Enum.chunks/4, Enum.chunks_by/2, Enum.concat/1 and Enum.concat/2

Enhancement Tool: Elixir

Support negative indices in Enum.at/fetch/fetch!

Enhancement Tool: Elixir

Enum.min/2 and Enum.max/2 are deprecated in favor of Enum.min_by/2 and Enum.max_by/2

Enhancement Tool: Elixir

Enum.join/2 and Enum.map_join/3 with a char list are deprecated

Elixir 0.10.1

· 1 change

Enhancement Tool: Elixir

Add Enum.shuffle/1

Elixir 0.10.0

· 1 change

Enhancement Tool: Elixir

Receiving the index of iteration in Enum.map/2 and Enum.each/2 is deprecated in favor of Stream.with_index/1