Text
Text
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}BidirectionalCollection where Element: Equatable {
/// In a sorted collection, replaces the given index with a predecessor that maps
to a unique element.
///
/// - Parameter index: A valid index of the collection. `index` must be greater
than `startIndex`.
func formUniqueIndex(before index: inout Index) {
var prev = index
repeat {
prev = index
formIndex(before: &index)
} while index > startIndex && self[prev] == self[index]
}
}
123456
123467
685679
635868
757576
757575
675757
766675
674675
686785
766685
Noelan