treak
This commit is contained in:
parent
eb9001044f
commit
183bdacca2
4 changed files with 12 additions and 8 deletions
|
@ -37,7 +37,7 @@ last = Prelude.last
|
|||
- Ignores leading/trailing whitespace, and throws away any trailing
|
||||
- text after the part that can be read.
|
||||
-}
|
||||
readMaybe :: (Read a) => String -> Maybe a
|
||||
readMaybe :: Read a => String -> Maybe a
|
||||
readMaybe s = case reads s of
|
||||
((x,_):_) -> Just x
|
||||
_ -> Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue