1
1
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:
Rob Rix 2015-10-13 01:01:32 -04:00
parent 1d012a91a4
commit 7fedcb2331

View File

@ -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
}
}