 import Foundation
 
 public extension Sequence {
+    public func toArray() -> [Element] {
+        return Array(self)
+    }
+    
     public var anyElement: Element? {
         return first { _ in true }
     }

        return true
    }
    
    public func toArray() -> [Element] {
        return Array(self)
    }
    
    public func count(where predicate: (Element) -> Bool) -> Int {
        return self.lazy.filter(predicate).count
    }
}


        let set = Set(b)
        return self.filter{ !set.contains($0) }
    }
    
    public func countMultiplicities() -> [Element : Int] {
        return self.group{ $0 }.mapValues{ $0.count }
    }
