summary refs log tree commit diff stats
path: root/lib/pure/collections
Commit message (Collapse)AuthorAgeFilesLines
* Replace double backticks with single backticks - Part 3 out of ~7 (#17207)Danil Yarantsev2021-02-282-6/+6
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-285-17/+17
|
* remove outdated codes (#17140)flywind2021-02-221-1/+0
| | | | | * remove unnecessary when statement * remove outdated codes
* use single backtick (#17141)flywind2021-02-212-23/+23
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-174-30/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* Improve the heapqueue module (#17034)konsumlamm2021-02-151-55/+82
| | | | | | Improve documentation Optimize toHeapQueue Rename siftup and siftdown Add tests for the heap property
* fix the wrong examples (#17035)flywind2021-02-151-19/+42
|
* tables module uses runnableExamples (#16994)flywind2021-02-133-335/+312
| | | | | * tables module use runnableExamples * disable the tests
* fix lists docs regression (#16981)flywind2021-02-091-21/+14
|
* Another typo corrected (#16974)Héctor M. Monacci2021-02-081-1/+1
| | | From `fliter proc` to `filter proc`
* std/lists: Various changes to `lists` (RFC #303) (#16536)Peter Salvi2021-02-081-142/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various changes to `lists` (RFC #303) * Removing a non-element is no-op; better tests * Remove preserves cycles; add appendMove alias; tests. * Return value for (singly linked) `lists.remove` * More test for lists.remove * Moved `lists.append` to the end of the file to see all `add` definitions * Disable testing js for now * Use workaround for swap js bug * Smaller diff * Undo "silent" deprecation of append * Correct typo in changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Remove `appendMoved` Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Don't remove appendMoved Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Correct typo (#16972)Héctor M. Monacci2021-02-081-1/+1
| | | From `fliter proc` to `filter proc`
* close #15767 (#16959)flywind2021-02-081-1/+8
| | | | | | | | | * fix some warnings * close #15767 * Revert "fix some warnings" This reverts commit 39f2f23b0026d50c42af7be3ad80edf0f1f19610.
* use typeof instead type (#16962)flywind2021-02-083-8/+8
|
* [ci skip] CountTable, remove link to unexisting procnarimiran2021-02-021-1/+0
|
* critbits: fix error from strictFuncs (#16877)ee72021-02-011-2/+2
| | | | | | | | | Previously, compiling a file containing just `import critbits` with `nim c --experimental:strictFuncs` would produce the following error: critbits.nim(529, 6) Error: 'toCritBitTree' can have side effects This was introduced by 2aed4186989e (#16564). Fixes: #16873
* intsets are here to stay (#16751)Andreas Rumpf2021-01-191-3/+1
|
* Improve documentation for packedsets (#16715)konsumlamm2021-01-161-3/+4
| | | | | | | | | * Improve documentation for packedsets Add more runnableExamples Add deprecated pragma to intsets Replace intsets with packedsets in lib.rst * Apply suggested changes
* Remove longestMatch in _WithPrefix iterators (#16689)konsumlamm2021-01-121-23/+15
|
* Improve documentation for deques (#16589)konsumlamm2021-01-061-156/+106
|
* Improve sequtils documentation (#16559)konsumlamm2021-01-041-78/+79
| | | | | | | * Improve sequtils documentation Uncomment assertions in tests * Use present tense
* Improve documentation for critbits (#16568)konsumlamm2021-01-031-135/+107
|
* Fix #16554 (#16564)hlaaftana2021-01-031-2/+3
|
* O(1) concatenation of singly- and doubly linked lists. (#16362)Peter Salvi2020-12-201-1/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * O(1) concatenation of singly- and doubly linked lists. There is also new `toSinglyLinkedList` and `toDoublyLinkedList` functions for conversion from `openArray`s, similarly to `toHashSet` or `toTable`. * Add `sequtils` import to runnable examples with `toSeq`. * Added missing call to runnable examples. * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * Improved tests for lists. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * More compact tests for lists with templates. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Added extended example to `lists.copy`. * Corrected .since annotations to 1.6 * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Since declarations changed to (1,5,1). * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Changelog update. * Fix rebasing errors. * Self-adding with `lists.addMove` results in a cycle now. Added some extra tests.
* sequtils.nim: Change some `func` back to `proc` (#16309)ee72020-12-141-28/+28
| | | | | | | | | | | This commit changes the funcs that take a `proc` parameter back to procs. This reverts some of commit 6f57ebae349f: sequtils.nim: Use `func` (#16293) See also: - https://github.com/nim-lang/Nim/issues/16303 - https://github.com/nim-lang/Nim/pull/16304
* Fix broken links in docs (#16336)Elliot Waite2020-12-142-37/+37
| | | | | * Fix broken links in docs * Fix rand HSlice links
* clean the docs of sequtils (#16332)flywind2020-12-141-97/+89
|
* improve tests for collections (#16328)Timothee Cour2020-12-121-63/+45
| | | | | | | * improve tests for collections * remove remaining code blocks in deques.nim * improve runnableExamples
* sequtils.nim: Use `func` (#16293)ee72020-12-092-47/+47
| | | | | | | | | * sequtils.nim: proc -> func * sequtils.nim: proc -> func in links * sequtils.nim: proc -> func in non-link doc comments * test: add `sequtils` to strictFuncs test
* fixed article duplication typos (#16216)ihlec2020-12-021-1/+1
|
* fixes #15076 (#16143)Andreas Rumpf2020-11-261-5/+5
| | | | | | | | | * fixes #15076 * heapqueue: optimized for ARC * added another test case [backport:1.4] * code cleanup
* move tests to testament (#16101)flywind2020-11-242-377/+0
| | | | | | | | | * move tests to testament * minor * fix random * disable test random
* improve document for heapqueue (#16107)flywind2020-11-241-46/+69
|
* sets minor improvement (#16087)flywind2020-11-211-269/+1
|
* deques minor improvement (#16084)flywind2020-11-211-129/+18
|
* heapqueue minor improvement (#16088)flywind2020-11-211-62/+10
|
* Make IntSet a generic ordinal set OrdSet[A] (#15564)landerlo2020-11-131-687/+7
| | | | | | | | | | | | | | * Make IntSet an ordinal set OrdSet[A: Ordinal] Backward compatibility with IntSet is maintained. IntSet is an alias for OrdSet[int] * move ordsets to new file, intsets exports it * ordset, move to lib/std folder * Fix `$` for ordsets and test cleanup * Fix ordsets compilation in doc example * Rename ordsets to packedsets
* fix #15941 (#15948)flywind2020-11-131-4/+7
| | | | | | | * fix #15941 * add testcase * update
* Update tables documentation (#15807)Thomas Tay2020-11-021-0/+34
| | | | Added a case where a user might use mgetOrPut and create an accidental copy of a seq.
* Grammar fixesClyybber2020-10-301-4/+4
|
* promote `collect` macro as a map+filter replacement (#15788)Miran2020-10-301-0/+27
| | | | | * promote `collect` macro as a map+filter replacement * Update lib/pure/collections/sequtils.nim
* fix #15750narimiran2020-10-281-0/+2
|
* Tables, use sink val arguments more actively (#15625)cooldome2020-10-192-10/+10
|
* Fix doc for CountTable (#15561) [backport]Christopher Dunn2020-10-131-1/+1
|
* docs minor (#15550)flywind2020-10-111-2/+2
|
* Iterate over smaller set when computing intersection (#15497)Benjamin Lee2020-10-061-2/+9
| | | Closes #15496
* heapqueue.nim: Add `toHeapQueue` proc (#15459)ee72020-10-021-0/+18
| | | | | | | | | Similar to: - `critbits.toCritBitTree` - `deques.toDeque` - `sets.toHashSet` - `tables.toTable` Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* intsets.nim: Add `toIntSet` proc (#15460)ee72020-10-021-3/+25
| | | | | | | Similar to: - `critbits.toCritBitTree` - `deques.toDeque` - `sets.toHashSet` - `tables.toTable`
* Add critbits.toCritBitTree (#15444)Juan Carlos2020-10-011-8/+20
| | | | | * Add critbits.toCritBitTree * https://github.com/nim-lang/Nim/pull/15444#discussion_r498035342
* Add 1 overload to apply (#15439)Juan Carlos2020-10-011-0/+5
|