Timothee Cour
e05aca8734
make unzip faster: seq[i]=val can be 7X faster than seq.add(elem) ( #13448 )
2020-02-21 17:26:52 +01:00
Kaushal Modi
bb777fef76
Add sequtils.unzip to complement sequtils.zip ( #13429 )
2020-02-20 19:15:34 +01:00
Miran
bf96d6d316
Idxmin & idxmax, continuation ( #13208 )
...
* 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>
2020-01-20 16:57:34 +01:00
Oscar Nihlgård
5456da3ca9
Fix sequtils.delete bug with out of bounds indexes ( #12506 )
2019-11-29 11:15:20 +01:00
narimiran
8394c00300
remove long-deprecated 'mapIt'
2019-11-13 14:24:25 +01:00
Kaushal Modi
b24560a140
Make sequtils.zip return seq of anonymous tuples ( #12575 )
...
* 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
2019-11-04 21:11:43 +01:00
Nindaleth
34dbc5699e
fix several typos in documentation and comments ( #12553 )
2019-10-30 09:08:45 +01:00
Jjp137
1d42108fda
sequtils: replace deprecated 'random' call within example ( #12515 ) [backport]
2019-10-25 09:47:34 +02:00
Jjp137
93461aee34
Fix many broken links
...
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.
2019-10-22 17:59:12 -07:00
Andreas Rumpf
60d64d1aef
use system.move instead of system.shallowCopy if the GC mode requires it
2019-10-04 09:48:45 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Kaushal Modi
0b511b15ea
styleCheck fix: type naming: s/outType/OutType/ ( #11749 )
2019-07-16 21:22:34 +02:00
Miran
2255d8795b
[other] prettify collections ( #11695 )
2019-07-09 22:45:23 +02:00
Miran
23e95dc629
[bugfix] fix delete in strutils and sequtils ( #11535 )
2019-06-20 21:04:37 +02:00
narimiran
cf47c2c60c
[other] documentation: deprecation comments are now auto-generated
2019-06-19 14:21:46 +02:00
Araq
95b65504e6
sequtils: minor typo
2019-05-10 19:50:23 +02:00
cooldome
3647c03cad
reimplement_pr_10974 ( #11130 )
2019-04-27 12:41:08 +01:00
Miran
e75049d7b6
fixes #10433 ( #10444 )
2019-01-24 12:22:59 +01:00
narimiran
52a54f5f04
documentation: remove author field [ci skip]
2019-01-17 07:15:40 +01:00
narimiran
2e8bf88614
sequtils doc: another quickfix [ci skip]
2019-01-16 12:32:00 +01:00
narimiran
3abe6e9e14
quickfix for sequtils docs [ci skip]
2019-01-16 11:58:51 +01:00
narimiran
b097081f10
better docs: sequtils
2019-01-16 09:45:27 +01:00
data-man
a38f353597
Add the parameter isSorted for the sequtils.deduplicate
2018-12-07 02:17:40 +05:00
Timothee Cour
02351d02e7
universal toSeq: works with UFCS; works with inline & closure iterators, and with iterables ( #8711 )
...
* universal toSeq: works with UFCS; works with inline, closure, and proc
iterators, and also non-iterators
* support all iterables with toSeq
* workaround for #9130
2018-11-22 11:47:14 +01:00
Araq
963292f725
added system.typeof operation; fixes #9093
2018-10-24 17:09:51 +02:00
Dominik Picheta
269b957e29
Merges #8451 manually. Fixes #8099 .
2018-10-03 21:25:11 -07:00
Araq
b9a1816009
make sequtils compile
2018-08-22 22:48:49 +02:00
Timothee Cour
af037546b0
fixes #7187 sequtils.toSeq produces the sequence from the iterator twice ( #8586 )
...
* cleanups refs #8584
* fixes #7187
2018-08-16 23:19:36 +02:00
Timothee Cour
ed9fd2b63c
fixes #8577 , fixes #8580 , other bug fixes ( #8584 )
2018-08-14 10:44:28 +02:00
LemonBoy
32b62097a2
Fix regression for mapIt ( #8567 )
...
Don't try to be too smart and limit the use of `evalOnce` where strictly
needed as not every value can be assigned with a `let`.
Fixes #8566
2018-08-08 15:34:21 +02:00
LemonBoy
ba5e2d6fcb
Make mapIt work on openArray's ( #8543 )
2018-08-07 18:45:27 +02:00
skilchen
57f4a5d429
sequtils: remove some aligning spaces around == to silence warnings
2018-07-21 19:16:05 +02:00
skilchen
9bacdd64c1
fix issues #6986 and #7501 ( #7513 )
2018-04-06 10:24:58 +02:00
Andreas Rumpf
89782460a3
fixes #7215
2018-02-14 10:09:35 +01:00
Andreas Rumpf
6ee08cf70c
fix documentation comments in sequtils.nim
2017-12-05 13:53:18 +01:00
Andreas Rumpf
58187f2120
added a warning that the .deprecate statement is unreliable for routines
2017-11-21 11:27:35 +01:00
Andreas Rumpf
5ccf69ffa3
cleaned up macros.nim
2017-11-19 13:23:04 +01:00
Andreas Rumpf
908a25a2ca
replaced asArray with a much more powerful mapLiterals macro
2017-11-18 14:18:00 +01:00
Andreas Rumpf
6976bf20f5
Use 'typedesc' instead of 'untyped'
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
b02ecda5a0
Move asArray macro back to sequtils
...
This reverts commit 72f653c2daa5c629ed8a57a4f53dcef56432aa26.
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
7744c6ce31
Moving asArray to future module
...
As per [suggestion](https://github.com/nim-lang/Nim/pull/6640#issuecomment-341565453 ) made by @Araq
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
6f799e1505
Swapping asArray parameter order
...
In reaction to https://github.com/nim-lang/Nim/pull/6640#issuecomment-341528413
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
3d11ef8511
Changing asArray documentation
...
in reaction to https://github.com/nim-lang/Nim/pull/6640#discussion_r148367553
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
70f3226836
avoid asArray macros import when using nimscript
2017-11-18 14:18:00 +01:00
Fredrik Høisæther Rasch
5dfbeab65f
Implement an asArray macro
...
fixes #6563
2017-11-18 14:18:00 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
narimiran
71c5c0a47f
Sequtils improvements ( #6574 )
2017-10-25 13:41:41 +02:00
narimiran
e73adde803
update links
2017-10-22 14:46:58 +02:00
narimiran
585ac9cc34
change seq name to list
2017-10-22 14:35:17 +02:00
narimiran
ea752f29a0
more descriptive names
2017-10-22 13:43:45 +02:00