blob: be5b1d4e1b358d15003e0596e1e22a7e7a3b01ee [file] [log] [blame]
public protocol mmGeneratorType {
associatedtype Element
}
public protocol mmSequenceType {
associatedtype Generator : mmGeneratorType
}
public protocol mmCollectionType : mmSequenceType {
mutating func extend<
S : mmSequenceType
> (_ seq: S) where S.Generator.Element == Self.Generator.Element
}
@inlinable
public func test<
EC1 : mmCollectionType,
EC2 : mmCollectionType
> (_ lhs: EC1, _ rhs: EC2) -> EC1
where EC1.Generator.Element == EC2.Generator.Element
{
var lhs = lhs
lhs.extend(rhs)
return lhs
}