[GHC] #5781: Add Data.List.at :: [a] -> Int -> Maybe a
GHC
cvs-ghc at haskell.org
Thu Jan 19 12:07:40 CET 2012
#5781: Add Data.List.at :: [a] -> Int -> Maybe a
---------------------------------+------------------------------------------
Reporter: nh2 | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.5
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by nh2):
No, (!!) is :: [a] -> Int -> a and errors on an index out of range.
I am looking for its safe version, [a] -> Int -> Maybe a.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5781#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list