import value from "./value.js";
import numberArray, {isNumberArray} from "./numberArray.js";

export default function(a, b) {
  if (isNumberArray(b)) return numberArray(a, b);
  var nb = b ? b.length : 0,
      na = a ? Math.min(nb, a.length) : 0,
      x = new Array(na),
      c = new Array(nb),
      i;

  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
  for (; i < nb; ++i) c[i] = b[i];

  return function(t) {
    for (i = 0; i < na; ++i) c[i] = x[i](t);
    return c;
  };
}

@@ -125,10 +125,14 @@
 %7B%0A  
-if
+return
  (is
@@ -149,23 +149,72 @@
 y(b)
-) return number
+ ? numberArray : genericArray)(a, b);%0A%7D%0A%0Aexport function generic
 Arra
@@ -220,17 +220,18 @@
 ay(a, b)
-;
+ %7B
 %0A  var n

Update array.js