summary refs log tree commit diff stats
path: root/lib/pure/collections
Commit message (Collapse)AuthorAgeFilesLines
* [minor] fix docs (#18834)flywind2021-09-111-6/+4
|
* sequtils now support strict effect tracking (#18782)Andreas Rumpf2021-09-021-9/+14
|
* various small documentation improvements (#18602)Miran2021-07-284-15/+22
|
* optimize for the non-throwing case (#18587)Antonis Geralis2021-07-261-4/+7
|
* complement notes of two doc strings of tables module (#18527)IterableTrucks2021-07-211-0/+4
| | | | | | | | | | | | | | | * complement notes of two doc strings warning the deprecated procedure's side effect * Update lib/pure/collections/tables.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/collections/tables.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: BillyZee <billyzee@localhost.localdomain> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Revert #17321 (#18521)konsumlamm2021-07-191-135/+135
| | | Use better names in example
* deprecate `sequtils.delete` and add an overload with saner semantics ↵Timothee Cour2021-07-151-3/+42
| | | | | | | | consistent with `system.delete` (#18487) * deprecate sequtils.delete and add an overload with saner semantics * AssertionDefect => IndexDefect * improve tsequtils * add tests; use splice in js for optimization
* fixes #17696 (#18276)flywind2021-06-161-2/+5
|
* fix #7295: use move(result) inside template to avoid copy with --gc:refc ↵Timothee Cour2021-06-041-10/+10
| | | | (#18168)
* workaround bug in sharedtables.withValue to unblock frozen CI on OSX (#18172)flywind2021-06-041-0/+4
|
* Ref #17697 improve withValue docs (#18154)flywind2021-06-031-31/+50
| | | | | * Ref #17697 improve withValue docs * address comments
* [std/tables] remove unnecessary `do: ` (#18160)flywind2021-06-021-10/+16
|
* [std/hashcommon]improve docs a bit (#18153)flywind2021-06-021-3/+3
| | | | * reduce duplicated deprecated messages
* fix #17941: UnusedImport works for var/let/const/type invoked inside a ↵Timothee Cour2021-05-081-1/+1
| | | | | | | generic (#17942) * fix #17941: UnusedImport works for var/let/const/type invoked inside a generic * fixup
* Remove confusing <//> (#17830)flywind2021-04-262-14/+14
|
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-212-2/+2
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* [std/deques] move data instead of copy + destroy (#17800)flywind2021-04-201-4/+2
|
* use sink and lent in deques (#17661)flywind2021-04-071-10/+10
| | | | | | | | | * use sink and lent in deques * Update lib/pure/collections/deques.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* lent support for tables (#17505)flywind2021-03-251-9/+9
|
* fix #17385, `len` must be declared before `items` (#17386)Miran2021-03-151-21/+21
|
* rename channels to channels_builtin (#17330)flywind2021-03-121-1/+1
| | | | | | | * improve test coverage for isolation * a bit better * rename channels to channels_builtin
* Use `.. warning::` (#17320)konsumlamm2021-03-101-2/+2
|
* Change parameter names in lists module from `L` (#17321)konsumlamm2021-03-101-127/+127
|
* Improve the lists module (#17312)konsumlamm2021-03-101-166/+185
|
* 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