Ilya Gorbunov
143d8d1520
Minor: fix issue reference
2020-05-19 19:24:00 +03:00
Dmitry Borodin
dd46d5ca5a
Add sample for Map.flatMap
2020-05-19 19:24:00 +03:00
Dmitry Borodin
1a0b59da49
KT-20357 Add sortedBy() sample ( #3283 )
2020-05-19 19:21:21 +03:00
Segun Famisa
d6a8003743
Add samples for String/CharSequence filter & filterNot ( #3390 )
...
* Add samples for String/CharSequence filter & filterNot
* Link samples to stdlib generator
2020-05-18 23:15:41 +03:00
Ilya Gorbunov
25f83e941c
Fix sample reference for unsigned array range sort
2020-05-18 20:37:11 +03:00
Ilya Gorbunov
c40c9a3d14
stdlib-gen: make 'sample' overwrite samples list instead of adding
...
It's more common for a function to have the single sample, and it's
more convenient to override it in `specialFor` blocks, rather than
to append another one.
2020-05-18 20:37:11 +03:00
Abduqodiri Qurbonzoda
0c7b04a495
Document fromIndex and toIndex parameters #KT-38388
2020-05-09 23:34:03 +03:00
Abduqodiri Qurbonzoda
5af76a07d4
Fix CharArray sort in JS IR-backend
2020-04-22 23:46:50 +03:00
Abduqodiri Qurbonzoda
d6472aa700
Reverse range and sortDescending range #KT-36955
2020-04-20 22:06:28 +03:00
Abduqodiri Qurbonzoda
4d7597fa5a
Document 'reduce' operation behavior on empty collections #KT-23322
2020-04-20 03:37:12 +03:00
Abduqodiri Qurbonzoda
3a99b3d5a4
Small refactoring to use Family.CodeExtension.size when appropriate
2020-04-19 07:59:09 +03:00
Abduqodiri Qurbonzoda
0d5ec27ac4
toHashSet is suboptimal for inputs with a lot of duplicates #KT-23142
2020-04-19 07:58:49 +03:00
Ilya Gorbunov
893021f22b
Introduce runningFold and runningReduce operations
...
runningFold is a synonym for scan,
runningReduce replaces scanReduce.
#KT-38060
2020-04-15 23:28:07 +03:00
Abduqodiri Qurbonzoda
4a7b1b210a
Add onEachIndexed similar to forEachIndexed #KT-37161
2020-04-11 03:47:47 +03:00
Ilya Gorbunov
15319eb88e
Implement in-place shuffle for arrays
...
Minor: reorder shuffle/shuffled extensions more consistently
#KT-25651 Fixed
2020-04-10 11:04:51 +03:00
Abduqodiri Qurbonzoda
508d0edd6d
Add the onEach extension function to the Array #KT-28290
2020-04-07 05:34:20 +03:00
n-p-s
7bb7c86fa9
Add samples for partition
2020-03-31 02:04:55 +03:00
Ilya Gorbunov
dd2aa3de28
Add sample for filterNot and improve sample for filter
2020-03-31 02:04:55 +03:00
Brian Plummer
f887a29279
Add sample for filter
2020-03-31 02:04:55 +03:00
adammc331
840f222867
Add sample for filterNotNull
2020-03-31 02:04:55 +03:00
Scott Weber
e8ee405cdb
Add sample for text version of chunked
2020-03-31 02:04:55 +03:00
Ilya Gorbunov
e8dff3609b
Add @ExperimentalUnsignedTypes to unsigned array snapshot extensions
2020-03-26 23:30:19 +03:00
Abduqodiri Qurbonzoda
b1fac4e721
Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866
2020-03-12 18:08:55 +03:00
Abduqodiri Qurbonzoda
b60633d79a
Add associateWith to Array<T> #KT-30372
2020-03-12 18:06:54 +03:00
Abduqodiri Qurbonzoda
e632d58936
Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161
2020-03-12 18:01:23 +03:00
Abduqodiri Qurbonzoda
1f721796b8
Add vararg overloads for maxOf/minOf functions #KT-33906
2020-02-26 04:17:19 +03:00
Abduqodiri Qurbonzoda
2566fbea87
toMutableList documentation is vague #KT-35231
2020-02-20 18:52:10 +03:00
Abduqodiri Qurbonzoda
f9ee1dc22d
Specify which element Iterable.distinctBy(selector) retains #KT-36356
2020-02-20 18:50:13 +03:00
Abduqodiri Qurbonzoda
ed7b8e9b85
Scan functions for Sequences and Iterable #KT-7657
2020-02-13 04:01:47 +03:00
Abduqodiri Qurbonzoda
1203df7405
Deprecate floating point to integral types lesser than Int #KT-30360
2020-01-22 23:27:35 +03:00
Abduqodiri Qurbonzoda
3cad1bbb51
Create method Collection.randomOrNull() #KT-35347
2020-01-16 22:25:53 +03:00
Ilya Gorbunov
30bdd463ad
Do not lower SinceKotlin version for unsigned arrays extensions if they already has some
2020-01-16 15:52:35 +03:00
Tillmann Berg
95300ae31d
KT-20357: Add sample for reduce, reduceRight and their indexed counterparts
2019-12-26 19:57:33 +03:00
Alfredo Delli Bovi
9546307243
Add sample for reduceOrNull and reduceRightOrNull
2019-12-26 19:27:46 +03:00
Alfredo Delli Bovi
06008c40ab
KT-33761 Add reduceRightOrNull
2019-12-26 19:27:46 +03:00
Alfredo Delli Bovi
f5d696d3c4
KT-33761 Add reduceOrNull
2019-12-26 19:27:46 +03:00
Tillmann Berg
cf86dc9a89
KT-20357: Add sample for Collections distinct and distinctBy methods
2019-12-11 07:42:05 +03:00
Dmitry Borodin
664d69b752
Add flatMap sample KT-20357
2019-11-29 17:35:06 +03:00
Dat Trieu
f334ad2ffc
KT-20357: Add samples for associate* functions ( #2798 )
...
* KT-20357: Add samples for functions related to associate
* KT-20357: Use same fib function for both samples
* KT-20357: Use examples with duplicate keys and simplify examples with primitives
* KT-20357: Use primitive samples for all arrays
* KT-20357: Use String splitting example to better illustrate the use for associate over associateBy with a valueSelector
2019-11-29 16:54:02 +03:00
Abduqodiri Qurbonzoda
834eeb567b
Alter componentN documentation
2019-10-10 05:08:44 +03:00
Abduqodiri Qurbonzoda
e54b405fe4
Fix Iterable, Sequence and String index overflow in windowed
2019-10-09 19:48:39 +03:00
Abduqodiri Qurbonzoda
b4d580fa91
JS: document array destructuring behavior (KT-17544)
2019-10-08 19:24:31 +03:00
Abduqodiri Qurbonzoda
63895483fd
Fix take method from iterating one extra element (KT-32024)
2019-08-15 01:01:36 +03:00
Abduqodiri Qurbonzoda
84971d2003
Mention union in intersect documentation and vice versa (KT-26212)
2019-08-12 01:15:20 +03:00
Ilya Gorbunov
65b0a5f903
Unify withIndex docs wording
2019-08-01 19:55:36 +03:00
Ilya Gorbunov
3751a8a797
Common Array.fill for unsigned arrays, improve docs, native impl name
...
KT-32359
2019-08-01 19:02:39 +03:00
Jake Wharton
1a6069382e
Provide Array.fill in common stdlib
...
KT-32359
2019-08-01 19:02:38 +03:00
Ilya Gorbunov
4fc942c5e9
KT-16602: Improve mutable sorting samples, fix sample references
2019-07-12 21:34:54 +03:00
Dat Trieu
38d26b1d92
KT-16602: Provide samples for sorting API usage
2019-07-12 21:32:03 +03:00
AJ Alt
ed96197d6b
Always use LF line endings in generated stdlib code
...
The code generation uses a mixture of literal `\n` characters and `appendln`. The latter insert `\r\n` on Windows by default, causing generated files to contain a mixture of line endings.
This commit sets the `line.separator` system property for the generator to `\n` so that `appendln` will never insert `\r` characters. As an additional measure, `.gitattributes` files were added to checkout generated stdlib files always with LF line endings.
2019-06-27 03:02:10 +03:00