Array+CNLiveExtensions.swift 374 Bytes
//
//  Array+CNLiveExtensions.swift
//  metaCode
//
//  Created by zx on 2023/11/24.
//

import Foundation

extension Array where Element: Equatable {
    
    // Remove first collection element that is equal to the given `object`:
    mutating func remove(_ object: Element) {
        if let index = firstIndex(of: object) {
            remove(at: index)
        }
    }
}