Ilya Gorbunov
559255f38e
windowed function: add default parameters, drop or keep partial windows, KEEP-11
...
Make step default to 1.
Add partialWindows boolean parameter defaulting to false to control
whether to keep partial windows in the end.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c04b0072af
Rename pairwise to zipWithNext, KEEP-11
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
99bd54116e
Docs and samples for 'windowed' function
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
b2f2e3537b
Docs and samples for 'chunked' function
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
e418f61f0c
Docs and samples for 'pairwise' function
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
3f23742298
Optimize 'windowed' and 'chunked' for char sequences, iterables and sequences
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
18c7a01ab5
Add tests for windowed and chunked, fix precondition checks
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a3a1c391cc
Generate 'chunked' and 'windowed' signatures and delegating implementations
...
Add implementations of windowed.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c815ccfd6a
Introduce 'pairwise' function, KEEP-11
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
ca8bf395c3
Do not create iterator in 'any', 'none', 'all' and 'count' unless necessary
...
#KT-19133 Fixed
2017-07-26 22:42:29 +03:00
Ilya Gorbunov
2792dbf988
Import for buildSequence in generated code for sequences
2017-05-05 18:01:02 +03:00
Ilya Gorbunov
ef72371fd7
Add samples for contentToString and contentDeepToString array operations
2017-05-03 17:44:30 +03:00
Marek Langiewicz
934b0b8c38
Fix List.takeLast for lists without RandomAccess
2017-05-03 16:38:15 +02:00
Ilya Gorbunov
37c3d8f204
Sort out warnings related to inline and library functions in stdlib-js
2017-04-18 18:51:20 +03:00
Ilya Gorbunov
f22375601b
Remove unneeded suppressions
2017-04-18 12:47:11 +03:00
Ilya Gorbunov
8f452ed046
Cleanup warnings in stdlib and generated code
2017-04-18 12:47:04 +03:00
Anton Bannykh
9b34e21619
JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
...
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).
The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Ilya Gorbunov
c98c2d9931
Remove 'nearly_stateless' category, do not mention statefulness for terminal operations.
...
#KT-16994
2017-03-24 19:06:06 +03:00
Ilya Gorbunov
4018db680e
Sequence operation classification regarding their statefulness and laziness.
...
#KT-16994 Fixed
2017-03-24 19:06:06 +03:00
Ilya Gorbunov
61e8848aa2
Add samples for sequence building API.
2017-03-07 13:32:39 +03:00
Ilya Gorbunov
a04e6de047
Add groupingBy and eachCount sample.
2017-03-07 13:31:44 +03:00
Anton Bannykh
4c808e8691
JS: concat vararg arguments using Kotlin.concat and Kotlin.concatPrimitive functions in order to be binary compatible with (Kotlin PrimitiveArray -> JS TypedArrays) mapping.
2017-02-15 18:58:29 +03:00
Ilya Gorbunov
25c3064554
Add explicit imports of kotlin.js.* to generated files.
2017-01-30 19:44:51 +03:00
Anton Bannykh
77aa685496
JS: char boxing
2017-01-30 16:31:44 +03:00
Ilya Gorbunov
01f53d0173
Return NaN as an average of an empty collection.
...
#KT-15399 Fixed
2017-01-27 14:53:33 +03:00
Ilya Gorbunov
661ff81e67
Specify names for parameters of functional types with two or more parameters to ease lambda completion.
...
#KT-13826
2017-01-27 14:46:29 +03:00
Alexey Andreev
c05870b461
JS: regenerate stdlib
2017-01-24 20:15:22 +03:00
Ilya Gorbunov
80f2efb625
joinTo/joinToString: Do not call toString on elements that are already CharSequence or Char.
...
#KT-15557
2017-01-13 19:49:57 +03:00
Ilya Gorbunov
04a0f0a036
Rename Grouping.elementIterator to sourceIterator
2017-01-11 16:49:45 +03:00
Ilya Gorbunov
2a2b417025
KEEP-23 implement group and fold operations
...
Docs for group-and-fold operations
Fix implementation for countEach and sumEachBy
countEach and sumEachBy implementations for JS
Rename keySelector to keyOf
Generate additional sources for groupingBy + headers
Rename countEach and sumEachBy to eachCount and eachSumOf.
2017-01-11 16:49:45 +03:00
Ilya Gorbunov
3bf38e62c8
Add a note about NaN propagation for floating point specializations.
2017-01-11 14:45:21 +03:00
Ilya Gorbunov
0bf2ba8701
Introduce new overloads of max and min to fix NaN propagation behavior on JVM.
2017-01-11 14:45:18 +03:00
Ilya Gorbunov
844c68286a
Refactor: replace Math.min with minOf in common code.
...
Add temporary import of kotlin.comparisons where required.
2017-01-11 14:42:36 +03:00
Ilya Gorbunov
51c24a0c3c
Introduce minOf/maxOf in kotlin.comparisons. #KT-7417
2017-01-11 14:42:36 +03:00
Ilya Gorbunov
2209631f1a
Add SinceKotlin to new coerceIn method.
2016-12-19 18:36:52 +03:00
Ilya Gorbunov
10f8e70322
Rename ClosedComparableRange to ClosedFloatingPointRange
2016-12-19 18:36:52 +03:00
Ilya Gorbunov
75992173b6
Unify Array.plus and plusElements function templates between JVM and JS.
2016-12-16 04:36:21 +03:00
Ilya Gorbunov
202cd81134
Unify Array.copyOf and copyOfRange function templates between JVM and JS.
2016-12-16 04:36:20 +03:00
Ilya Gorbunov
572a63f0e2
Unify Array.sort and sortWith function templates between JVM and JS.
...
Introduce new inline-only overload Array<out T: Comparable<T>>.sort().
2016-12-16 04:36:18 +03:00
Ilya Gorbunov
e890cb137f
Unify MutableList.reverse function template between JVM and JS
2016-12-16 04:36:16 +03:00
Ilya Gorbunov
085f476d22
Unify content[ToString, Equals, HashCode] function templates between JVM and JS
2016-12-16 04:36:14 +03:00
Ilya Gorbunov
f3df648f4a
Unify toTypedArray and asList templates between JVM and JS
2016-12-16 04:36:12 +03:00
Ilya Gorbunov
6ea1cde449
Generate additional sources for JS instead of copying them from JVM
2016-12-16 04:31:07 +03:00
Alexey Andreev
212b9f37b3
JS: get rid of external extension functions and properties in stdlib
2016-12-09 15:13:08 +03:00
Alexey Andreev
c558b5d2b2
JS: regenerate stdlib
2016-12-08 15:41:41 +03:00
Ilya Gorbunov
87c9d4e84e
Introduce unsafeCast function. Provide more JS-idiomatic emptyArray() implementation.
...
#KT-14034 Fixed
2016-11-19 03:37:47 +03:00
Ilya Gorbunov
fae5c88f22
Remove java.util references from the common code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
8feaaf4df0
Allow to annotate generated API with SinceKotlin and annotate new array functions.
2016-11-08 18:08:59 +03:00
Ilya Gorbunov
dceec89572
JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
f3da656d6e
contentEquals, contentHashCode, contentToString: Add js implementation and tests
...
#KT-13582
2016-11-08 17:23:45 +03:00