OA
Size: a a a
OA
K
OA
OA
K
OA
OA
OA
G
p
G
В
parse, don't validate
anyway приходит к Result
на каком-то этапе 🤔G
parse, don't validate
anyway приходит к Result
на каком-то этапе 🤔G
The Maybe is still there, but this time, we handle the Nothing case very early in our program: right in the same place we were already doing the input validation. Once that check has passed, we now have a NonEmpty FilePath value, which preserves (in the type system!) the knowledge that the list really is non-empty. Put another way, you can think of a value of type NonEmpty a as being like a value of type [a], plus a proof that the list is non-empty.
В
The Maybe is still there, but this time, we handle the Nothing case very early in our program: right in the same place we were already doing the input validation. Once that check has passed, we now have a NonEmpty FilePath value, which preserves (in the type system!) the knowledge that the list really is non-empty. Put another way, you can think of a value of type NonEmpty a as being like a value of type [a], plus a proof that the list is non-empty.
parse, don't validate
тз-за этого в расте не стоит использовать, но всё же иногда это может быть больно (всё как всегда зависит от случая)EG
EG
P