on master help sign in
Rename replicate to repeat.
074bb08Alexander Noriega
libraries/List.elm+2−2
@@ -187,5 +187,5 @@ drop : Int -> [a] -> [a]
187drop = Native.List.drop
187drop = Native.List.drop
188
188
189-- Creates a list with n copies of a value: `(replicate 3 (0,0) == [(0,0),(0,0),(0,0)]`
189-- Creates a list with n copies of a value: `(replicate 3 (0,0) == [(0,0),(0,0),(0,0)]`
190−replicate : Int -> a -> [a]
190+repeat : Int -> a -> [a]
191−replicate = Native.List.replicate
191+repeat = Native.List.repeat
libraries/Native/List.js+2−2
@@ -241,7 +241,7 @@ Elm.Native.List = function(elm) {
241 return xs;
241 return xs;
242 }
242 }
243
243
244− function replicate(n, a) {
244+ function repeat(n, a) {
245 var arr = [];
245 var arr = [];
246 while (n > 0) {
246 while (n > 0) {
247 arr.push(a);
247 arr.push(a);
@@ -353,7 +353,7 @@ Elm.Native.List = function(elm) {
353 nth:F2(nth),
353 nth:F2(nth),
354 take:F2(take),
354 take:F2(take),
355 drop:F2(drop),
355 drop:F2(drop),
356− replicate:F2(replicate),
356+ repeat:F2(repeat),
357
357
358 join:F2(join),
358 join:F2(join),
359 split:F2(split)
359 split:F2(split)