Permalink
Browse files

array: concat

  • Loading branch information...
1 parent f99664b commit 696732859f64943c9857bb5fdf6511cbba439fad @indutny committed Nov 21, 2012
Showing with 15 additions and 1 deletion.
  1. +1 −1 deps/candor
  2. +14 −0 lib/array.can
View
@@ -39,4 +39,18 @@ exports.forEach = (arr, cb) {
}
}
+exports.concat = (arrs...) {
+ res = []
+ k = 0
+ i = 0
+ while (i < sizeof arrs) {
+ j = 0
+ while (j < sizeof arrs[i]) {
+ res[key++] = arrs[i][j++]
+ }
+ i++
+ }
+ return res
+}
+
return exports

0 comments on commit 6967328

Please sign in to comment.