on master help sign in
Fiddle with imports
7203039Christian Widera
libraries/Array.elm+3−2
@@ -21,7 +21,8 @@ first into a list, operating on it, and then turning it back into an array.
21-}
21-}
22
22
23import Native.Array
23import Native.Array
24−import Basic
24+import Basics (..)
25+import Maybe (..)
25import List
26import List
26
27
27data Array a = Array
28data Array a = Array
@@ -155,7 +156,7 @@ set = Native.Array.set
155 updates [(1,7),(2,8)] (fill 3 1) == fromList [1,7,8]
156 updates [(1,7),(2,8)] (fill 3 1) == fromList [1,7,8]
156-}
157-}
157updates : [(Int, a)] -> Array a -> Array a
158updates : [(Int, a)] -> Array a -> Array a
158−updates assocs array = List.foldl (Basic.uncurry Native.Array.set) array assocs
159+updates assocs array = List.foldl (uncurry Native.Array.set) array assocs
159
160
160{-| Slice an array given a range. The selection is inclusive, so the last
161{-| Slice an array given a range. The selection is inclusive, so the last
161element in the selection will also be in the new array. This may change in the
162element in the selection will also be in the new array. This may change in the