diff options
author | ee7 <45465154+ee7@users.noreply.github.com> | 2020-08-07 22:54:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 22:54:34 +0200 |
commit | 6f482ab9346230f8e9c24f71091bcd5ca2cb41f8 (patch) | |
tree | 34f648e222f9cfbaa34297c2cff3674a79284951 /lib/pure/collections/chains.nim | |
parent | a528382e057780845585f0befa6da505462a622e (diff) | |
download | Nim-6f482ab9346230f8e9c24f71091bcd5ca2cb41f8.tar.gz |
deques.nim: Refactor the `toDeque` functionality (#15166)
This commit polishes the new proc introduced by d9ed816b10a6. Changes: - Rename to `toDeque` for more consistency with well-known procs like `toHashSet` and `toTable`. - Rename the `openArray` parameter. The name `arr` was potentially less clear given that the proc can be used with a seq (or string). - Add a `since` annotation. - Reword the doc comment, and clarify that ordering is preserved. - Add runnableExamples. - Add "see also" cross linking between `initDeque` and `toDeque`. - Remove duplicate `nextPowerOfTwo`. The `initImpl` template already includes it. - Implement the proc using the `items` iterator, rather than indexing. This matches the implementation of `sets.toHashSet` and `tables.toTable`. - Add a test within `when isMainModule`. - Add a changelog entry.
Diffstat (limited to 'lib/pure/collections/chains.nim')
0 files changed, 0 insertions, 0 deletions