|
|
|
|
|
by mrkeen
1204 days ago
|
|
> (2) not actually explicitly stated in the article! the difference between validation and parsing lies almost entirely in how information is preserved. Consider the following pair of functions:
validateNonEmpty :: [a] -> IO ()
parseNonEmpty :: [a] -> IO (NonEmpty a)
Both of these functions check the same thing, but parseNonEmpty gives the caller access to the information it learned, while validateNonEmpty just throws it away.
|
|