Provide more information on Enum.OutOfBoundsError
Fix infinite loop on Enum.take/2 with negative index on empty enumerable
Module
66 changes across 34 versions
Changes by version
Provide more information on Enum.OutOfBoundsError
Fix infinite loop on Enum.take/2 with negative index on empty enumerable
Deprecate passing a range with negative step on Enum.slice/2, give first..last//1 instead
Allow slicing with steps in Enum.slice/2
Allow slices to overflow on both starting and ending positions
Optimize Enum.concat/1 for lists of lists
Add Enum.slide/3
Optimize Enum.into/3 and Map.new/2
Add Enum.count_until/2 and Enum.count_until/3
Add Enum.product/1
Add Enum.zip_with/2, Enum.zip_with/3, Enum.zip_reduce/3, and Enum.zip_reduce/4
Add support for functions as the second argument of Enum.with_index/2
Allow a sorting function on Enum.min_max_by/3,4, including the new compare/2 conventions
Speed up getting one random element from enumerables
Add Enum.frequencies/1, Enum.frequencies_by/2, and Enum.map_intersperse/2
Allow a sorting function on Enum.min/max/min_by/max_by
Add asc/desc and compare/1 support to Enum.sort/2
Allow positive range slices on infinite streams given to Enum.slice/2
Ensure the first equal entry is returned by Enum.min/2 and Enum.max/2
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
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
Reintroduce zipping of any enumerable of enumerables in Enum.zip/1 (regression in v1.6.0)
Enum.partition/2 is deprecated in favor of Enum.split_with/2
Fix chunk_every/4 when step > count
Add Enum.chunk_by/4 and Stream.chunk_by/4
Add Enum.chunk_every/2 and Enum.chunk_every/4 with a more explicit API than Enum.chunk/2 and Enum.chunk/4
Deprecate Enum.filter_map/3 in favor of Enum.filter/2 + Enum.map/2 or for-comprehensions
Add Enum.map_every/2 that invokes the given function with every nth item
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
Introduce Enum.zip/1 to zip multiple entries at once
Enum.partition/2 has been deprecated in favor of Enum.split_with/2
Deprecate Enum.uniq/2 in favor of Enum.uniq_by/2
Return nil if enumerable halts in Enum.find_index/3
Add Enum.group_by/3 that allows developers to map on the value being grouped
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.
Add Enum.drop_every/2 that drops every nth, including the first one
Passing a dictionary to Enum.group_by/3 is deprecated
Use the faster and auto-seeding :rand instead of :random in Enum.shuffle/1 and Enum.random/1 and Enum.take_random/2
Add Enum.with_index/2
Fix non-integer member checks with ranges
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
Inline common map usage in Enum functions for performance
Enum.uniq/2 is deprecated in favor of Enum.uniq_by/2
Ensure Enum.take/2 does not consume one extra item when halting on the last emittable item
Add Enum.sort_by/3
Improve performance of Enum.join/2 and Enum.map_join/3 by using iolists
Enum.slice/2 and Enum.slice/3 always returns a list (and never nil)
Fix Enum.join/2 and Enum.map_join/3 for empty binaries at the beginning of the collection
Add Enum.group_by/2, Enum.into/2, Enum.into/3, Enum.traverse/2 and Enum.sum/2
Add Enum.flat_map_reduce/3
Deprecate Enum.first/1 in favor of Enum.at/2 and List.first/1
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
Enumerable.count/1 and Enumerable.member?/2 should now return tagged tuples. Please see Enumerable docs for more info
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
Behaviour of Enum.drop/2 and Enum.take/2 has been switched when given negative counts
Behaviour of Enum.zip/2 has been changed to stop as soon as the first enumerable finishes
Enumerable.reduce/3 protocol has changed to support suspension. Please see Enumerable docs for more info
Add Enum.slice/2 with a range
Document and enforce Enum.member?/2 to use the match operator (===)
Add Enum.take_every/2
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
Support negative indices in Enum.at/fetch/fetch!
Enum.min/2 and Enum.max/2 are deprecated in favor of Enum.min_by/2 and Enum.max_by/2
Enum.join/2 and Enum.map_join/3 with a char list are deprecated
Add Enum.shuffle/1
Receiving the index of iteration in Enum.map/2 and Enum.each/2 is deprecated in favor of Stream.with_index/1