on master help sign in
Add push example
bb81ddbChristian Widera
libraries/Array.elm+4−1
@@ -111,7 +111,10 @@ zipWith f a b =
111empty : Array a
111empty : Array a
112empty = Native.Array.empty
112empty = Native.Array.empty
113
113
114−{-| Push an item to the end of an array. -}
114+{-| Push an item to the end of an array.
115+
116+ push 3 (fromList [1,2]) == fromList [1,2,3]
117+-}
115push : a -> Array a -> Array a
118push : a -> Array a -> Array a
116push = Native.Array.push
119push = Native.Array.push
117
120