@@ -11,7 +11,7 @@ first into a list, operating on it, and then turning it back into an array.
1111@docs empty, length, get, safeGet, getWithDefault
1212
1313# Putting Arrays Together
14−@docs fill, fromList, concat, set, updates
14+@docs fill, fromList, concat, set, updates, push
1515
1616# Taking Arrays Apart
1717@docs elements, indices, assocs, slice
@@ -21,6 +21,7 @@ first into a list, operating on it, and then turning it back into an array.
2121-}
2222
2323import Native.Array
24+import Basic
2425import List
2526
2627data Array a = Array
@@ -109,13 +110,9 @@ zipWith f a b =
109110empty : Array a
110111empty = Native.Array.empty
111112
112−{- Push an item to the end of an array.
113−This is implemented in Native, but one should be forced to accumulate a list of
114−new elements, turning it into an array and then concatting it. So it will remain
115−commented out for the moment.
113+{-| Push an item to the end of an array. -}
116114push : a -> Array a -> Array a
117115push = Native.Array.push
118−-}
119116
120117{-| Return the value at the index. Breaks, if index is out of range. If the
121118array length is unkown, use safeGet oder getWithDefault.
@@ -158,7 +155,7 @@ set = Native.Array.set
158155 updates [(1,7),(2,8)] (fill 3 1) == fromList [1,7,8]
159156-}
160157updates : [(Int, a)] -> Array a -> Array a
161−updates assocs array = List.foldl (uncurry Native.Array.set) array assocs
158+updates assocs array = List.foldl (Basic.uncurry Native.Array.set) array assocs
162159
163160{-| Slice an array given a range. The selection is inclusive, so the last
164161element in the selection will also be in the new array. This may change in the