Swift 4.1 Conditional Conformance Is Amazing
Here’s a non-empty collection type that works with any collection.
Wrapping a
MutableCollection
type gives the non-empty type all those methods for free!
Previously: Conditional Conformance in the Standard Library.
Update (2018-03-23): See also: Swift Unwrapped.
Update (2018-03-27): See also: Swift Unwrapped.
Update (2018-05-01): See also: Ole Begemann.
1 Comment RSS · Twitter
April 3, 2018 10:19 AM
[…] Swift 4: Synthesizing Equatable and Hashable Conformance, Swift 4.1 Conditional Conformance Is Amazing, Code Size Optimization Mode in Swift […]