mirror of
https://github.com/github/semantic.git
synced 2024-11-25 21:43:07 +03:00
Generalize the Array extension to RangeReplaceableCollectionType.
This commit is contained in:
parent
1d012a91a4
commit
7fedcb2331
@ -1,5 +1,5 @@
|
||||
extension Array {
|
||||
static func cons(head: Element, _ tail: Array) -> Array {
|
||||
return [head] + tail
|
||||
extension RangeReplaceableCollectionType {
|
||||
static func cons(head: Generator.Element, _ tail: Self) -> Self {
|
||||
return [ head ] + tail
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user