3 ms·
I never suggested calling FileExists separately, no idea where you got that from. The article explicitly refers to modeling the codomain of the function accurat
by sirwhinesalot 3y ago
I never suggested calling FileExists separately, no idea where you got that from. The article explicitly refers to modeling the codomain of the function accurately, in this case something like Result<File, FileError>
- lelanthran 3y ago> I never suggested calling FileExists separately, no idea where you got that from. I got it from this: >>> (i.e., file might be missing, remember to check) What did you mean by "remember to check"?
- sirwhinesalot 3y agoYou can't use the Result sum type without first checking if it is the valid case or the error case. The type system won't let you forget to check. it's reminding you with red squiggles in your IDE. This is a good feature to have.