This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The array passed to the function is the array of object that will be omitted from the final array. Important if your merging an array of objects where the Equatable property may be the same but others may differ. | |
extension Array where Element: Equatable { | |
public mutating func mergeElements<C : Collection>(newElements: C) where C.Iterator.Element == Element{ | |
let filteredList = newElements.filter({!self.contains($0)}) | |
self.append(contentsOf: filteredList) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SampleSaleArticleViewController.swift | |
// aSample | |
// | |
// Created by Matthew hammond on 09/11/2020. | |
// | |
import UIKit | |
import Buy | |
import SnapKit |
OlderNewer