Concatenate two Iterable sources

@param a a non-null Iterable value
@param b a non-null Iterable value
@return an Iterable that will iterate through all the values from 'a' and then all the values from 'b'
@param <T> the value type
188472
public static <T> Iterable<T> concat( final Iterable<T> a,
                                          final Iterable<T> b ) {
        assert (a != null);
        assert (b != null);
        return () -> Collections.concat(a.iterator(), b.iterator());

    }
210078
public static <T1 extends Serializable, T2 extends Serializable> Pair<T1, T2> next(T1 a, T2 b) {
    return new Pair<>(a, b);
  }
663169
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> concatMapnts(IntFunction<? extends IntStream> b){

        return a->a.ints(i->i,s->s.flatMap(b));
    }
1031376
function concat(a, b) {
  if (!a && !b) throw new Error("Please specify valid arguments for parameters a and b.");
  if (!b || b.length === 0) return a;
  if (!a || a.length === 0) return b;
  const c = new a.constructor(a.length + b.length);
  c.set(a);
  c.set(b, a.length);
  return c;
}
899106
public static int[] pairwiseAdd(int[] a, int[] b) {
    int[] result = new int[a.length];
    for (int i = 0; i < a.length; i++) {
      result[i] = a[i] + b[i];
    }
    return result;
  }
262760
@SuppressWarnings("unchecked")
    public static <T> List<T> concat(final Iterable<T> first, final Iterable<T> ... other) {
        List<T> list = newArrayList(first);
        for (Iterable<T> iter : other) {
            list.addAll(newArrayList(iter));
        }
        return list;
    }
24948
public static <T> Iterable<T> merge(Comparator<T> comp, Iterable<T>... iterables)
    {
        Iterator[] arr = new Iterator[iterables.length];
        for (int ii=0;ii<arr.length;ii++)
        {
            arr[ii] = iterables[ii].iterator();
        }
        return iterable(merge(comp, arr));
    }
62017
private MultiValueMap<String, String> union(MultiValueMap<String, String> map1, MultiValueMap<String, String> map2) {
		MultiValueMap<String, String> union = new LinkedMultiValueMap<String, String>(map1);
		Set<Entry<String, List<String>>> map2Entries = map2.entrySet();
		for (Iterator<Entry<String, List<String>>> entryIt = map2Entries.iterator(); entryIt.hasNext();) {
			Entry<String, List<String>> entry = entryIt.next();
			String key = entry.getKey();
			List<String> values = entry.getValue();
			for (String value : values) {
				union.add(key, value);
			}
		}
		return union;
	}
429752
@Override
    public <R> Future<R> concatMap(final Function<? super T, ? extends Iterable<? extends R>> mapper) {
        return (Future<R>) MonadicValue.super.concatMap(mapper);
    }
529254
public static <T> T[] concat(T[] a, T... b) {
        int aLen = a.length;
        int bLen = b.length;

        if (bLen == 0) {
            return a;
        }
        if (aLen == 0) {
            return b;
        }

        @SuppressWarnings("unchecked")
        T[] c = (T[]) Array.newInstance(a.getClass().getComponentType(), aLen + bLen);
        System.arraycopy(a, 0, c, 0, aLen);
        System.arraycopy(b, 0, c, aLen, bLen);

        return c;
    }
704628
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){

        return a->ReactiveSeq.fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
    }
722695
public static <R> Stream<R> zip(final ByteIterator a, final ByteIterator b, final ByteBiFunction<R> zipFunction) {
        return new IteratorStream<>(new ObjIteratorEx<R>() {
            @Override
            public boolean hasNext() {
                return a.hasNext() && b.hasNext();
            }

            @Override
            public R next() {
                return zipFunction.apply(a.nextByte(), b.nextByte());
            }
        });
    }
225394
public static Function<? super ReactiveSeq<Integer>, ? extends ReactiveSeq<Integer>> concatInts( ReactiveSeq<Integer> b){
        return a->ReactiveSeq.fromSpliterator(IntStream.concat(a.mapToInt(i->i),b.mapToInt(i->i)).spliterator());
    }
1053259
private static Integer[] mergeDocLists(Integer[] a, Integer[] b) {
    Integer[] answer = new Integer[a.length + b.length];
    int i = 0;
    int j = 0;
    int k = 0;
    Integer tmp;
    while (i < a.length && j < b.length) {
      tmp = a[i] < b[j] ? a[i++] : b[j++];
      for (; i < a.length && a[i].equals(tmp); i++)
        ;
      for (; j < b.length && b[j].equals(tmp); j++)
        ;
      answer[k++] = tmp;
    }
    while (i < a.length) {
      tmp = a[i++];
      for (; i < a.length && a[i].equals(tmp); i++)
        ;
      answer[k++] = tmp;
    }
    while (j < b.length) {
      tmp = b[j++];
      for (; j < b.length && b[j].equals(tmp); j++)
        ;
      answer[k++] = tmp;
    }
    return Arrays.copyOf(answer, k);
  }
39187
public static <R> Stream<R> zip(final FloatIterator a, final FloatIterator b, final FloatBiFunction<R> zipFunction) {
        return new IteratorStream<>(new ObjIteratorEx<R>() {
            @Override
            public boolean hasNext() {
                return a.hasNext() && b.hasNext();
            }

            @Override
            public R next() {
                return zipFunction.apply(a.nextFloat(), b.nextFloat());
            }
        });
    }
616297
public Gather<T> concat(Iterable<? extends T> iterable) {
		return from(Iterables.concat(each(), iterable));
	}
317308
public static int[] concatArrays(int[] a, int[] b) {
        final int alen = a.length;
        final int blen = b.length;
        if (alen == 0) {
            return b;
        }
        if (blen == 0) {
            return a;
        }
        final int[] result = new int[alen + blen];
        arraycopy(a, 0, result, 0, alen);
        arraycopy(b, 0, result, alen, blen);
        return result;
    }