on master help sign in
Add push example
commitbb81ddb30290c10916e3658b00f0f3ff91e901f1 authorChristian Widera <xash@posteo.de> dateMon 31 Mar 2014, 16:22 (13 years ago) parent7203039
1 file changed+4−1
libraries/Array.elm+4−1
libraries/Array.elm+4−1
@@ -111,7 +111,10 @@ zipWith f a b =
111111empty : Array a
112112empty = Native.Array.empty
113113
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+-}
115118push : a -> Array a -> Array a
116119push = Native.Array.push
117120