Merge pull request #1932 from xou/haskell-finite-list-indexing

[haskell/en]: Fix !! operator
This commit is contained in:
Adam Bard 2015-10-31 18:17:05 +08:00
commit e87c1bfd51

View File

@ -81,7 +81,7 @@ not False -- True
[5,4..1] -- [5, 4, 3, 2, 1] [5,4..1] -- [5, 4, 3, 2, 1]
-- indexing into a list -- indexing into a list
[0..] !! 5 -- 5 [1..10] !! 3 -- 4
-- You can also have infinite lists in Haskell! -- You can also have infinite lists in Haskell!
[1..] -- a list of all the natural numbers [1..] -- a list of all the natural numbers