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



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



	}


	@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 where !(try includeElement(element)) {
			excludes.append(element)
		}

		minus(excludes)
	}


