private static <G extends Gene<?, G>> Genotype<G>
	toGenotype(final Factory<Genotype<G>> factory) {
		return factory instanceof Genotype<G> gt ? gt : factory.newInstance();
	}
Combines the given {@code codecs} into one codec. This lets you divide
a problem into subproblems and combine them again.

@param codecs the {@code Codec} sequence of the subproblems
@param decoder the decoder which combines the argument types from the
       given codecs, to the argument type of the resulting codec.
@throws NullPointerException if one of the arguments is {@code null}
jenetics/src/main/java/io/jenetics/engine/CompositeCodec.java