Swift 3, Extend Array where items of Array are of a certain type
<p>I've written a struct that holds basic Asset data:</p>

<pre><code>struct Asset: AssetProtocol {

    init (id: Int = 0, url: String) {
        self.id = id
        self.url = URL(string: url)
    }

    var id: Int 
    var url: URL?

}
</code></pre>

<p>It subscribes to <code>AssetProtocol</code></p>

<pre><code>protocol AssetProtocol {
    var id: Int { get }
    var url: URL? { get }
}
</code></pre>

<p>I'm hoping to extend the Array (Sequence) where the elements in that Array are items that subscribe to the AssetProtocol. Also, for these functions to be able to mutate the Array in place.</p>

<pre><code>extension Sequence where Iterator.Element: AssetProtocol {

    mutating func appendUpdateExclusive(element newAsset: Asset) {    
        ...
</code></pre>

<p>How can I iterate through and mutate this sequence? I've tried half a dozen ways and can't seem to get it right!</p>