Open andys8 opened 5 years ago
validate returns type List error for the Err case of Result.
validate
List error
Err
Result
validate : Validator error subject -> subject -> Result (List error) (Valid subject)
How to handle Err [ ]? Can we get rid of it?
Err [ ]
Use a non-empty-list of error to represent the error case.
error
(firstError, otherErrors) : (error, List error)
validate
returns typeList error
for theErr
case ofResult
.Issue
How to handle
Err [ ]
? Can we get rid of it?Possible solution
Use a non-empty-list of
error
to represent the error case.(firstError, otherErrors) : (error, List error)