import Foundation

extension Array {

    func count(where closure: (Element) -> Bool) -> Int {
        var result = 0
        forEach { element in
            if closure(element) {
                result += 1
            }
        }
        return result
    }
}
