Dave Abrahams
01127b32d5
index(n, stepsFrom: i)
...
M-x findr-query-replace
\<advance(\([^:]+?\),\([
]+\)by: *\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,\(?:[
]+\)limit: *\(?:[^()]*\|[^()]+([^()]*)[^()]*\)\)?)
index(\3,\2stepsFrom: \1\4)
2016-03-25 17:54:39 -07:00
Dave Abrahams
8d9e62b274
[stdlib] indexing model: rename next/previous
...
I'm not too satisfied with the names for the updating: versions, but
this is a start.
2016-03-22 17:13:54 -07:00
Dmitri Gribenko
55885fb5ed
New indexing model: tighten requirements on SubSequence types
2016-03-22 15:02:45 -07:00
Dave Abrahams
2202ac93c4
[stdlib] indexing model: merge upstream
2016-03-15 13:03:27 -07:00
Dave Abrahams
6cbd1f9c3a
[stdlib] indexing model: drop ReverseRandomAccessIndex
...
Now that the strideable constraint is dropped, we don't need this anymore.
2016-03-15 12:57:54 -07:00
Dave Abrahams
7419330d99
[stdlib] indexing model: drop redundant operators
...
These were already provided by default; no need to code them.
2016-03-15 12:57:00 -07:00
Dmitri Gribenko
157d3c84bd
New indexing model: implement ReverseRandomAccessCollection.advance() and .distance()
2016-03-14 20:04:11 -07:00
Dmitri Gribenko
3cde854287
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 01:11:32 -08:00
Daniel Duan
276370b599
[stdlib] apply SE-0040 to stdlib
2016-03-11 16:01:41 -08:00
Shawn Erickson
80670a2b24
corrected & improved Filter and Reverse
2016-03-08 11:18:32 -08:00
Shawn Erickson
969f1457c2
Fixed Reverse compile issues & fleshed out aspects of Filter and Reverse
2016-03-07 20:26:20 -08:00
Dmitri Gribenko
ad1428e1d6
New collection indexing model: removed old index protocols
...
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00
Dmitri Gribenko
ffeec94ea4
stdlib: fix coding style
2016-02-23 14:00:46 -08:00
Max Moiseev
78ba5d5f3f
[stdlib] Requires in comments changed to Precondition
2016-02-19 18:57:26 -08:00
Dmitri Gribenko
dd75aed67a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-17 14:40:05 -08:00
Dmitri Gribenko
efaa39ea79
stdlib: add first argument labels and some other changes to conform to API guidelines
2016-02-15 23:47:54 -08:00
Nate Cook
51251dc133
Convert imperative function summaries to present.
...
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74
Remove style on *generator* and friends.
2016-02-12 04:20:01 -06:00
Nate Cook
32f81e8238
Add missing abstracts for types and protocols.
2016-02-11 11:47:27 -06:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
practicalswift
ca9e488f30
[gardening] Add "-*- swift -*-" to *.swift.gyb. Remove from *.swift.
2016-01-23 10:27:03 +01:00
Adriano Ferreira
e6be43090e
Adjust space in property/subscript declarations
2016-01-22 22:02:29 -05:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Adriano Ferreira
e6cbebe6ea
Revert "Adjust space in property/subscript declarations"
...
This reverts commit 47ab2e0e28 .
2016-01-22 19:53:01 -05:00
Adriano Ferreira
47ab2e0e28
Adjust space in property/subscript declarations
2016-01-22 17:03:15 -05:00
Dmitri Gribenko
62f73f4469
Rename CollectionDefaultIterator to IndexingIterator
2016-01-21 11:49:03 -08:00
Doug Gregor
7d70b704e4
Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines
2016-01-19 23:18:20 -08:00
Dmitri Gribenko
74ce1ca79c
Add unavailable declarations for Swift 2.2 -> 3 migration
2016-01-19 14:32:59 -08:00
gregomni
e2dee6b9dd
[stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
...
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00
Max Moiseev
f51e708a8f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
Max Moiseev
50371821fe
reverse() => reversed()
2015-12-18 16:20:01 -08:00
Maxim Moiseev
9e50505970
internal or public // @testable initializers
2015-12-17 17:02:49 -08:00
Dmitri Gribenko
73ce9ae7e9
Collection.count => .length
...
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Maxim Moiseev
a072007dfe
ReverseIndexType => ReverseIndexProtocol
2015-12-16 14:38:06 -08:00
Maxim Moiseev
b702b1a903
more number type renames
2015-12-10 17:08:41 -08:00
Maxim Moiseev
c678a839dc
IndexType => Index
2015-12-09 17:16:42 -08:00
Maxim Moiseev
6f4335ddc6
_ReverseCollectionType => _ReverseCollection
2015-12-09 17:16:31 -08:00
Maxim Moiseev
01e1a7bd52
LazyCollectionType => LazyCollectionProtocol
2015-12-09 17:16:22 -08:00
Maxim Moiseev
7e2466c14e
CollectionType => Collection
2015-12-09 17:12:48 -08:00
Dmitri Gribenko
99d3f96c6d
Rename IndexingGenerator to CollectionDefaultIterator
2015-12-09 17:12:07 -08:00
Dmitri Gribenko
2cf172160c
Rename SequenceType.Generator associated type to SequenceType.Iterator
2015-12-09 17:11:05 -08:00
Dmitri Gribenko
174d475833
stdlib: Remove unavavailable APIs that were left as migration aids
...
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.
Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Dmitri Hrybenko
dd3194a18c
stdlib: adopt @warn_unused_result
...
rdar://20957486
Swift SVN r31048
2015-08-06 14:53:18 +00:00
David Farler
311baf73cf
Index protocol extensions
...
- Remove free Swift functions for advance and distance and replace
them with protocol extension methods:
- advancedBy(n)
- advancedBy(n, limit:)
- distanceTo(end)
- Modernize the Index tests
- Use StdlibUnittest
- Test for custom implementation dispatch
Perf impact: No significant changes reported in the
Swift Performance Measurement Tool.
rdar://problem/22085119
Swift SVN r30958
2015-08-03 20:06:44 +00:00
Dave Abrahams
ad43a596bd
[stdlib] Retire the old lazy subsystem...
...
...replacing it with the new, after passing API review!
* The lazy free function has become a property.
* Before we could extend protocols, we lacked a means for value types to
share implementations, and each new lazy algorithm had to be added to
each of up to four types: LazySequence, LazyForwardCollection,
LazyBidirectionalCollection, and LazyRandomAccessCollection. These
generic adapters hid the usual algorithms by defining their own
versions that returned new lazy generic adapters. Now users can extend
just one of two protocols to do the same thing: LazySequenceType or
LazyCollectionType.
* To avoid making the code duplication worse than it already was, the
generic adapters mentioned above were used to add the lazy generic
algorithms around simpler adapters such as MapSequence that just
provided the basic requirements of SequenceType by applying a
transformation to some base sequence, resulting in deeply nested
generic types as shown here. Now, MapSequence is an instance of
LazySequenceType (and is renamed LazyMapSequence), and thus transmits
laziness to its algorithms automatically.
* Documentation comments have been rewritten.
* The .array property was retired
* various renamings
* A bunch of Gyb files were retired.
Swift SVN r30902
2015-08-01 03:52:13 +00:00