private static Func <T, ValidationResult> Validate <T>(Func <T, bool> validator, string errorMessage) => (value) => validator(value) ? ValidationResult.OK() : ValidationResult.Error(errorMessage);
private static Func <T, ValidationResult> AlwaysValid <T>() => (value) => ValidationResult.OK();