Merge pull request #33 from ole/fix-lastWhere Fix last(where:) implementation
Merge pull request #33 from ole/fix-lastWhere
Fix last(where:) implementation
A sorted array type for Swift 4.0+.
Provides the SortedArray type, an array that keeps its elements sorted according to a given sort predicate.
SortedArray
Written by Ole Begemann, February 2017.
For more info, see the GitHub repo and my accompanying blog article.
The current release supports Swift 4.0 and up.
If you need support for older Swift version, here’s a list of the latest releases that support specific Swift versions:
Since the code has no dependencies other than the Swift standard library (it doesn’t even use Foundation), it should work on all platforms where Swift is available.
I tested it on macOS, iOS, tvOS, and Linux.
Add this to your Package.swift file:
Package.swift
// Package.swift import PackageDescription let package = Package( name: "<Your package name>", dependencies: [ .Package(url: "https://github.com/ole/SortedArray.git", majorVersion: 0) ] )
Add this to your Cartfile:
Cartfile
github "ole/SortedArray" ~> 0.7
Integration via Carthage should work for macOS, iOS, tvOS, and watchOS targets.
Clone the repository and add or copy SortedArray.swift to your project. It has no dependencies.
SortedArray.swift
None.
MIT license.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SortedArray
A sorted array type for Swift 4.0+.
Provides the
SortedArray
type, an array that keeps its elements sorted according to a given sort predicate.Written by Ole Begemann, February 2017.
For more info, see the GitHub repo and my accompanying blog article.
Supported Platforms
The current release supports Swift 4.0 and up.
If you need support for older Swift version, here’s a list of the latest releases that support specific Swift versions:
Since the code has no dependencies other than the Swift standard library (it doesn’t even use Foundation), it should work on all platforms where Swift is available.
I tested it on macOS, iOS, tvOS, and Linux.
Usage
Swift Package Manager
Add this to your
Package.swift
file:Carthage
Add this to your
Cartfile
:Integration via Carthage should work for macOS, iOS, tvOS, and watchOS targets.
Manually
Clone the repository and add or copy
SortedArray.swift
to your project. It has no dependencies.Dependencies
None.
License
MIT license.