     }
     
     @warn_unused_result
-    func filter(@noescape predicate: Value -> Bool) throws -> Value {
+    func filter(@noescape predicate: Value throws -> Bool) throws -> Value {
         return try map {
-            if predicate($0) { return $0 }
+            if try predicate($0) { return $0 }
             throw DistilError.FilteredValue(type: Value.self, value: $0)
         }
     }
     
     @warn_unused_result
-    func filter(predicate: Value -> Bool) -> Distillate<Value> {
+    func filter(predicate: Value throws -> Bool) -> Distillate<Value> {
         return Distillate { try self.filter(predicate) }
     }
     


public extension DistillateType where Value: CollectionType {
    @warn_unused_result
    func replaceEmpty(@noescape with: () -> Value) throws -> Value {
        return try map { $0.isEmpty ? with() : $0 }
    }
    
    @warn_unused_result
    func replaceEmpty(with: () -> Value) -> Distillate<Value> {
        return Distillate { try self.replaceEmpty(with) }
    }
    


public extension DistillateType where Value: OptionalType {
    @warn_unused_result
    func replaceNil(@noescape with: () throws -> Value.Wrapped) throws -> Value.Wrapped {
        return try value().optionalValue ?? with()
    }
    
    @warn_unused_result
    func replaceNil(with: () throws -> Value.Wrapped) -> Distillate<Value.Wrapped> {
        return Distillate { try self.replaceNil(with) }
    }
    
