We have reimplemented Enum.at/3, Enum.fetch/2, Enum.fetch!/2,
Enum.random/1, Enum.slice/2, and Enum.slice/3 to be more
efficient by using the new protocol function.
This partially implements #6955. We have decided to not replace
`count/1` by an `aggregate/2` callback because it became clear
we cannot implement `min/1` for date ranges since `Enum.min/1`
does a structural comparison. Given ranges are still the only case
that requires custom aggregations, we have decided to inline those
in Enum until we have more evidence that such callback is necessary.
This commit adds table alignment in markdown which allows the following
for tables:
right aligned | center aligned | left aligned
-: | :-: | :-
a | b | c
This will output a table in the following format:
right aligned | center aligned | left aligned
a | b | c
If headings are set, the header line (the line immediately below the
headings is ignored when calculating the max width for the columns.
All lines are trimmed of additional whitespace leading and trailing
whitespace to prevent tables that look like:
right aligned | center aligned | left aligned
------------: | :------------: | :-
a | b | c
right aligned | center aligned | left aligned
a | b | c
The previous format would use | before code blocks
and would remove # from headings, we have reverted
those changes to make the printed documentation and
help be closer to what it would look on source while
providing more information (in the case of headings).
IO Module:
* Impoves wording in documentation, particularly in the use of :all, :line, count
* Standardizes arg names to be `line_*`.
* Adds function guards to check for integers.
* Unicode is a proper noun, so it should be always capitalized.
* Adds backticks to args suchs as `device`, `item`, `count`.
* When functions are "Unicode unsafe", they are indicated in the first paragraph of docs.
* IO.puts: code simplified removing unnecessary variable.
* Adds \n to example in IO.gets/2
* Adds example in IO.chardata_to_string/1 when dealing with strings
* Renames args in IO.each_stream/2 and IO.each_binstream/2
* Adds tests for IO.getn/2-3 calling functions with different arities
IO.Steam Module:
* Adds a note about side effects when dealing with IO streams.