ValidationResult was already made covariant in #56. This improves upon that by making Invalid invariant and extend ValidationResult<Nothing>, which is possible since Invalid does not hold the result, only the errors.
Additionally, make map an inline function which improves performance.
ValidationResult was already made covariant in #56. This improves upon that by making
Invalid
invariant and extendValidationResult<Nothing>
, which is possible sinceInvalid
does not hold the result, only the errors.Additionally, make
map
an inline function which improves performance.