Add "check" function to Control.Monad
Generalisation of "guard".
check (not . isSpace) 'c' == Just 'c'
check (not . isSpace) ' ' == Nothing
See example in attached darcs patch
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |