summary refs log tree commit diff stats
path: root/lib/pure/collections
Commit message (Collapse)AuthorAgeFilesLines
* Idxmin & idxmax, continuation (#13208)Miran2020-01-201-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add idxmin() which returns the index of the minimum value * Add idxmax() which returns the index of the maximum value * Add tests for idxmin() * Add tests for idxmax() * Remove initialization of result = 0 * Adds overloading for arrays (no enums indexed arrays yet) * Add support for enum index arrays * Fix tests with enum * Fix tests for idxmax * Change names of the procedures to minIndex and maxIndex * address Araq's comments: - remove 'array' versions - add .since pragma - return 'int' instead of 'Natural' - add changelog entry Co-authored-by: Federico A. Corazza <20555025+Imperator26@users.noreply.github.com>
* [backport] fix #12813, fix #13079 (#13099)Miran2020-01-101-4/+14
| | | Correctly remove a key from CountTable when it is set to zero.
* Auto-initialize deques (#12879)Ico Doornekamp2019-12-211-3/+17
|
* remove unused import (#12900)Krzysztof Majk2019-12-151-1/+1
|
* fixes #12798 [backport]Araq2019-12-041-0/+1
|
* Fix sequtils.delete bug with out of bounds indexes (#12506)Oscar Nihlgård2019-11-291-1/+6
|
* Discussion both in (#12678)c-blake2019-11-201-31/+41
| | | | | | | | | | | https://github.com/nim-lang/Nim/pull/12600 and in https://forum.nim-lang.org/t/5499 indicates that everyone is happy/happier with ``pop``. This just renames the brand new ``take``s to ``pop`` and installs inline aliases/wrappers to preserve ``Table.take`` and ``TableRef.take``. Update apis.rst to try to maintain consistency of remove-and-return procs.
* remove long-deprecated 'mapIt'narimiran2019-11-131-7/+0
|
* .cursor implementation (#12637)Andreas Rumpf2019-11-121-4/+7
| | | | | | | | | | | * cursors: first implementation * added currently failing test * .cursor works for doubly linked lists * make -d:useMalloc work again * added code to nil out refs in a destructor * it's now called --gc:arc * renderer.nim: render nkBreakState properly * make simple closure iterators work without leaking
* fix #12519: introduce OrderedTable.take, CountTable.del, CountTable.take ↵Miran2019-11-081-4/+148
| | | | | | | | | | | | (#12600) * add OrderedTable.take * add CountTable.del and CountTable.take * add .since pragma to the introduced public procs * add changelog entry [ci skip]
* Make sequtils.zip return seq of anonymous tuples (#12575)Kaushal Modi2019-11-041-40/+64
| | | | | | | | | | * Make sequtils.zip return seq of anonymous tuples Earlier the tuples had named fields "a" and "b" and that made it difficult to assign the zip returned seqs to other vars which expected seqs of tuples with field names other than "a" and "b". * Make sequtils.zip backwards compatible with Nim 1.0.x
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-302-2/+2
|
* sequtils: replace deprecated 'random' call within example (#12515) [backport]Jjp1372019-10-251-1/+1
|
* Fix word wrappingJjp1372019-10-222-5/+6
|
* Fix many broken linksJjp1372019-10-224-7/+7
| | | | | | Note that contrary to what docgen.rst currently says, the ids have to match exactly or else most web browsers will not jump to the intended symbol.
* fixes #11764, faster hashing of (u)int (#12407)Miran2019-10-151-2/+2
|
* fixes #12366 [backport] (#12393)Andreas Rumpf2019-10-091-0/+17
|
* use system.move instead of system.shallowCopy if the GC mode requires itAndreas Rumpf2019-10-045-10/+24
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-2/+2
|
* last stdlib cleanupsAraq2019-09-213-0/+6
|
* removed the deprecatedGet pragmaAraq2019-09-211-3/+2
|
* lib\pure\htmlgen.nimAraq2019-09-212-761/+0
| | | | avoid callsite for htmlgen
* fix #12200, cannot 'inc' CountTable by a negative value (#12208)Miran2019-09-171-2/+5
| | | | | | * fix #12200, cannot 'inc' CountTable by a negative value * use Positive
* fixes a subtle tables.nim regressionAraq2019-09-051-32/+32
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* [bugfix] critbits styleCheck fix: consistent var naming (#11752)Kaushal Modi2019-07-161-8/+8
|
* styleCheck fix: type naming: s/outType/OutType/ (#11749)Kaushal Modi2019-07-161-9/+9
|
* minor style changesAraq2019-07-101-2/+2
|
* make more parts of the stdlib compile with --styleCheck:errorAraq2019-07-101-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-3/+3
| | | | --styleCheck:error
* [other] prettify collections (#11695)Miran2019-07-0914-186/+209
|
* [bugfix] fix #11588, don't check if SharedTable is initializednarimiran2019-06-262-11/+13
|
* [bugfix] fix OrderedTable iterators (#11562)Miran2019-06-221-5/+7
|
* [bugfix] fix `delete` in strutils and sequtils (#11535)Miran2019-06-201-1/+1
|
* [bugfix] fix OrderedTable default initialization (#11549)Miran2019-06-202-2/+3
|
* [other] documentation: deprecation comments are now auto-generatednarimiran2019-06-191-3/+1
|
* [refactoring] refactor the compiler and stdlib to deprecation warnings (#11419)Arne Döring2019-06-111-2/+2
|
* make fullpaths the default in error messages and stack traces for mor… ↵Andreas Rumpf2019-06-052-2/+2
| | | | | | | | | | | | (#11385) * make fullpaths the default in error messages and stack traces for more convenient development * split up -d:release into -d:release and -d:danger flags * workaround a Nim config parser bug * fixes an old nim config parser bug * make megatest green again * make nimpretty tests work again * make nimsuggest green
* Render deprecated pragmas (#8886)LemonBoy2019-06-034-15/+9
| | | | | | | | | * Render deprecated pragmas * fix the expected html * clean up the documentation regarding deprecations * fix typo * fix system.nim * fix random
* sets: minor documentation fixes [ci skip] (#11377)Jjp1372019-06-021-3/+3
| | | | | | | | Mainly replace a backslash, which was supposed to represent set difference, with the Unicode symbol for set difference (U+2216). The backslash did not appear in the output since it is used to escape characters in reST. Fix a few typos as well.
* right shift is now by default sign preserving (#11322)Arne Döring2019-05-291-11/+11
| | | | | | | | | | | * right shift is now by default sign preserving * fix hashString and semfold * enable arithmetic shift right globally for CI * fix typo * remove xxx * use oldShiftRight as flag * apply feedback * add changelog entry
* fixes #11344Araq2019-05-281-4/+9
|
* fixes #1286; object case transitions are now soundAndreas Rumpf2019-05-271-6/+2
|
* Workaround "move not found" exception in JS when using tables. (#11256)Dominik Picheta2019-05-151-1/+4
|
* sequtils: minor typoAraq2019-05-101-1/+1
|
* CountTable: check for usages after sorting (#11189)Miran2019-05-081-1/+10
|
* tables: check for mutation when iterating (#11160)Miran2019-05-041-42/+127
|
* introduce temporary <//> for 'owned' to get this compile with 0.19 (#11145)Andreas Rumpf2019-05-022-15/+19
| | | | | | | | * introduce temporary <//> for 'owned' to get this compile with 0.19 * make newTable[string, owned Node]() compile (but it crashes) * make sink/owned parameters consistent * make actiontable test compile again * VM: support sytem.move; makes tests green
* Initialized collections (#11094)Miran2019-04-296-424/+650
| | | | | | | | | | | | * tables: initialized by default * sets: initialized by default * DRY: extract shared functionality * add a changelog entry * fix errors * don't test include files * make it work for sharedtables * fix discovered bugs * add exhaustive tests
* reimplement_pr_10974 (#11130)cooldome2019-04-271-0/+16
|