Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

Redefined index-related functions for Data.List

# Documentation

module Data.Index

(!!) :: [a] -> Index [] Int -> a Source #

`>>>`

2`[1..7] !! 1`

`>>>`

7`[1..7] !! end`

`>>>`

5`[1..7] !! (end-2)`

`>>>`

4`[1..7] !! mid`

take :: Index [] Int -> [a] -> [a] Source #

`>>>`

"abcdefghij"`take 10 ['a'..'z']`

`>>>`

"abcdefghij"`take (mid - 3) ['a'..'z']`