Concatenate a sequence of farrays.

    The variadic *fs* input is a homogeneous sequence of functions or arrays.
328950
def fcat(*fs):
    
    items = list()
    for f in fs:
        if isinstance(f, boolfunc.Function):
            items.append(f)
        elif isinstance(f, farray):
            items.extend(f.flat)
        else:
            raise TypeError("expected Function or farray")
    return farray(items)
654567
def concat(cls, variables, dim='concat_dim', positions=None,
               shortcut=False):
        
        if not isinstance(dim, str):
            dim, = dim.dims

        variables = list(variables)
        first_var = variables[0]

        if any(not isinstance(v, cls) for v in variables):
            raise TypeError('IndexVariable.concat requires that all input '
                            'variables be IndexVariable objects')

        indexes = [v._data.array for v in variables]

        if not indexes:
            data = []
        else:
            data = indexes[0].append(indexes[1:])

            if positions is not None:
                indices = nputils.inverse_permutation(
                    np.concatenate(positions))
                data = data.take(indices)

        attrs = OrderedDict(first_var.attrs)
        if not shortcut:
            for var in variables:
                if var.dims != first_var.dims:
                    raise ValueError('inconsistent dimensions')
                utils.remove_incompatible_items(attrs, var.attrs)

        return cls(first_var.dims, data, attrs)
74283
function seq() {
    var fn;
    var t = this;
    for (var i = 0; i < arguments.length; i++) {
        fn = arguments[i];
        t = fn.call(t);
        if (!t)
            return false;
    }
    return this;
}
92186
def parallel_fn(f):
    

    def simple_parallel(func, sequence, **args):
        """ f takes an element of sequence as input and the keyword args in **args"""
        if 'processes' in args:
            processes = args.get('processes')
            del args['processes']
        else:
            processes = multiprocessing.cpu_count()

        pool = multiprocessing.Pool(processes)  # depends on available cores

        result = pool.map_async(universal_worker, pool_args(func, sequence, args))
        pool.close()
        pool.join()
        cleaned = [x for x in result.get() if x is not None]  # getting results
        cleaned = asarray(cleaned)
        return cleaned
    return partial(simple_parallel, f)
528038
function fillArray(low, high, step, def) {
            step = step || 1;
            var i = [], x;
            for (x = low; x <= high; x += step) {
                i[x] = def === undefined ? x : (typeof def === 'function' ? def(x) : def);
            }
            return i;
        }
501406
def concat(cls, *args):
        
        width = 0
        val = 0
        for arg in args:
            if not isinstance(arg, BinWord):
                raise TypeError('need BinWord in concat')
            val |= arg._val << width
            width += arg._width
        return cls(width, val)
1332966
function(left) {
    return function(right) {
      if (!L.isArray(right)) L.fail("L.cat expects an array argument on the RHS");

      return _concat.call(left, right);
    };
  }
702965
function concat() {
  const args = Array.from(arguments).filter(e => e != null);
  const baseArray = Array.isArray(args[0]) ? args[0] : [args[0]];
  return Array.prototype.concat.apply(baseArray, args.slice(1));
}
416139
def concat_ast(asts: Sequence[DocumentNode]) -> DocumentNode:
    
    return DocumentNode(
        definitions=list(chain.from_iterable(document.definitions for document in asts))
    )
608502
function concatenation() {
    var ret = this.seq(
        repetition,
        this.manyf(this.seqf(
            this.many1f(c_wsp),
            repetition)));
    if (ret[2].length === 0) {
        return ret[1];
    }
    var cats = ret[2].map(function(el){ return el[2]; });
    return [].concat(ret[1]).concat(cats);
}
906344
function concatAllArray(array) {
  var ret = [];
  for (var ii = 0; ii < array.length; ii++) {
    var value = array[ii];
    if (Array.isArray(value)) {
      push.apply(ret, value);
    } else if (value != null) {
      throw new TypeError(
        'concatAllArray: All items in the array must be an array or null, ' +
        'got "' + value + '" at index "' + ii + '" instead'
      );
    }
  }
  return ret;
}
2984
def concatenate(cls, *args):
        
        nargs = len(args)
        if nargs == 1:
            return args[0]

        vs = [a.v for a in args if a.v is not None]
        vcs = [a.vc for a in args if a.vc is not None]
        fs = [a.f for a in args if a.f is not None]

        if vs and len(vs) != nargs:
            raise ValueError('Expected `v` for all args or none.')
        if vcs and len(vcs) != nargs:
            raise ValueError('Expected `vc` for all args or none.')
        if fs and len(fs) != nargs:
            raise ValueError('Expected `f` for all args or none.')

        # Offset face indices by the cumulative vertex count.
        face_offsets = np.cumsum([v.shape[0] for v in vs[:-1]])
        for offset, f in zip(face_offsets, fs[1:]):  # https://bitbucket.org/logilab/pylint/issues/603/operator-generates-false-positive-unused pylint: disable=unused-variable
            f += offset

        return Mesh(
            v=np.vstack(vs) if vs else None,
            vc=np.vstack(vcs) if vcs else None,
            f=np.vstack(fs) if fs else None,
        )
981619
def append(self, other):
        

        to_concat = [self]

        if isinstance(other, (list, tuple)):
            to_concat = to_concat + list(other)
        else:
            to_concat.append(other)

        for obj in to_concat:
            if not isinstance(obj, Index):
                raise TypeError('all inputs must be Index')

        names = {obj.name for obj in to_concat}
        name = None if len(names) > 1 else self.name

        return self._concat(to_concat, name)
1175919
function _eachArrayForward(arry, fn) {
  let ret = true
  for (let i = 0; i < arry.length; i++) {
    ret = fn(arry[i], i, arry)
    if (ret === false) {
      break
    }
  }
  return ret
}
793766
def join(*args):
		
		if len(args) == 0:
			return

		result = WBinArray(int(args[0]), len(args[0]))
		if len(args) == 1:
			return result
		else:
			result = result.extend(*(args[1:]))
		return result
936123
def _vars(ftype, name, *dims):
    """"""
    shape = _dims2shape(*dims)
    objs = list()
    for indices in itertools.product(*[range(i, j) for i, j in shape]):
        objs.append(_VAR[ftype](name, indices))
    return farray(objs, shape, ftype)
312042
function sequence(arrayOfTasks) {
  return series.Series.all(slice.call(arguments, 1)).then(function(args) {
    return series.Series.from(arrayOfTasks).map(function(task) {
      return task.apply(undefined, args);
    });
  });
}