mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-01 04:20:39 +02:00
Merge pull request #1932 from xou/haskell-finite-list-indexing
[haskell/en]: Fix !! operator
This commit is contained in:
@@ -81,7 +81,7 @@ not False -- True
|
||||
[5,4..1] -- [5, 4, 3, 2, 1]
|
||||
|
||||
-- indexing into a list
|
||||
[0..] !! 5 -- 5
|
||||
[1..10] !! 3 -- 4
|
||||
|
||||
-- You can also have infinite lists in Haskell!
|
||||
[1..] -- a list of all the natural numbers
|
||||
|
Reference in New Issue
Block a user