aboutsummaryrefslogtreecommitdiffstats
path: root/src/Data/List/Extra.hs
blob: d18bc76538f9880124fcb8e3070dd5d25122d014 (plain)
1
2
3
4
5
6
7
8
module Data.List.Extra where

import Data.Maybe (listToMaybe)


(!!?) :: [a] -> Int -> Maybe a
x !!? i | i >= 0 = listToMaybe (drop i x)
_ !!? _ = Nothing
[cgit] Unable to lock slot /tmp/cgit/d0000000.lock: No such file or directory (2)