 
 let DoesntContainUsername: String -> Bool = { _ in return true }
 let val = try? "password"
-    .tested(by: .`in`(5...10))
+    .tested(by: StringLength.`in`(5...10))
     .tested(by: { $0.characters.contains(nonAlphanumeric) })
     .tested(by: { $0 != lastPassword })
     .tested(by: DoesntContainUsername)

    }
}

extension String {
    func tested(by tester: StringLength) throws -> String {
        return try self.tested(by: tester.test)
    }
}

public class EmailValidator: ValidationSuite {
    public static func test(input value: String) throws -> Bool {
        return true
    }
}

 validated by Tester -> Verified<T: Tester>
 validated by TestSuite -> Verified<T: TestSuite>

 tested by (Self -> Bool) -> Self
 tested by Tester -> Self
 tested by TestSuite -> Self
 */

// MARK: Validators

public protocol Validator {
    associatedtype InputType: Validatable
    func test(input value: InputType) -> Bool
}

public protocol ValidationSuite: Validator {
    associatedtype InputType: Validatable
    static func test(input value: InputType) -> Bool
}

extension ValidationSuite {
    public func test(input value: InputType) -> Bool {
        return self.dynamicType.test(input: value)
    }
}

