@@ -122,7 +122,7 @@ push = Native.Array.push
122122
123123{-| Get the element at a particular index.
124124
125− getOrFail 2 (A.fromList [3,2,1]) == 1
125+ getOrFail 0 (A.fromList [0,1,2]) == 0
126126
127127Warning: this function will result in a runtime error if the index is not found,
128128so it is best to use `get` or `getOrElse` unless you are sure the index will be
@@ -133,9 +133,10 @@ getOrFail = Native.Array.get
133133
134134{-| Return Just the element at the index or Nothing if the index is out of range.
135135
136− get 2 (fromList [3,2,1]) == Just 2
137− get 5 (fromList [3,2,1]) == Nothing
138− get -1 (fromList [3,2,1]) == Nothing
136+ get 0 (fromList [0,1,2]) == Just 0
137+ get 2 (fromList [0,1,2]) == Just 2
138+ get 5 (fromList [0,1,2]) == Nothing
139+ get -1 (fromList [0,1,2]) == Nothing
139140-}
140141get : Int -> Array a -> Maybe a
141142get i array =
@@ -146,8 +147,8 @@ get i array =
146147{-| Get the element at the index. Or if the index is out of range, a default
147148value is returned.
148149
149− getOrElse 0 2 (fromList [3,2,1]) == 1
150− getOrElse 0 5 (fromList [3,2,1]) == 0
150+ getOrElse 0 2 (fromList [0,1,2]) == 2
151+ getOrElse 0 5 (fromList [0,1,2]) == 0
151152-}
152153getOrElse : a -> Int -> Array a -> a
153154getOrElse default i array =