| ZVON > References > Haskell reference |
| Intro / Search / ZVON |
| | Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
| Module: | Prelude |
|---|---|
| Operator: | (!!) |
| Type: | [a] -> Int -> a |
| Priority: | 9 |
| Description: | accepts a list and an integer and returns the item in the list at integer position. The numbering starts with 0. |
| Related: | |
| Keywords: | array, index, list |
Input: [1,2,3] !! 0
Output: 1
Input: [6,5,4,3,2,1] !! 2
Output: 4
Input: "Hello" !! 1
Output: 'e'