mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[Haskell/en] Explain the !! operator
This commit is contained in:
parent
33cd1f57ef
commit
aa8d8e408a
@ -61,6 +61,8 @@ not False -- True
|
||||
|
||||
-- A string is a list of characters
|
||||
['H', 'e', 'l', 'l', 'o'] -- "Hello"
|
||||
|
||||
-- Lists can be indexed with the `!!` operator followed by an index
|
||||
"This is a string" !! 0 -- 'T'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user