 	}
 
 
-	public mutating func filter(includeElement: (T) -> Bool) {
+	@warn_unused_result
+	public func filterAsOrderedSet(@noescape includeElement: T throws -> Bool) rethrows -> OrderedSet<T> {
+		var filteredElements = OrderedSet<T>()
+		for element in orderedElements where try includeElement(element) {
+			filteredElements.add(element)
+		}
+
+		return filteredElements
+	}
+
+
+	public mutating func filterInPlace(@noescape includeElement: T throws -> Bool) rethrows {
 		var excludes = [T]()
-		for element in elements {
-			if !includeElement(element) {
-				excludes.append(element)
-			}
+		for element in elements where !(try includeElement(element)) {
+			excludes.append(element)
 		}
 
 		minus(excludes)
-	}
-
-
-	@warn_unused_result
-	public func filterAsOrderedSet(@noescape includeElement: (T) -> Bool) -> OrderedSet<T> {
-		var filteredElements = OrderedSet<T>()
-		for element in orderedElements {
-			if includeElement(element) {
-				filteredElements.add(element)
-			}
-		}
-
-		return filteredElements
 	}
 
 



	@warn_unused_result
	public func mapAsOrderedSet<U: Hashable>(@noescape transform: (T) -> U) -> OrderedSet<U> {
		var newSet = OrderedSet<U>(minimumCapacity: count)
		for element in orderedElements {
			newSet.add(transform(element))
		}

		return newSet



	public mutating func intersect(set: OrderedSet<T>) {
		filterInPlace { set.contains($0) }
	}


