
19 Aug
2013
19 Aug
'13
1:48 p.m.
Hi, What is the proper way to implement a non-monadic function that checks whether a given value is correct and gives a proper error message otherwise ? What is the recommended option ? * Either String a check val | valid val = Right val | otherwise = Left errorMsg * Maybe String check val | valid val = Nothing | otherwise = Just errorMsg Cheers, Jose