public LongChromosome map(final Function<? super long[], long[]> f) {
		requireNonNull(f);

		final var range = LongRange.of(_min, _max);
		final var genes = LongStream.of(f.apply(toArray()))
			.mapToObj(v -> LongGene.of(v, range))
			.collect(ISeq.toISeq());

		return newInstance(genes);
	}
Maps the gene alleles of this chromosome, given as {@code long[]} array,
by applying the given mapper function {@code f}. The mapped gene values
are then wrapped into a newly created chromosome.

{@snippet lang="java":
final LongChromosome chromosome = null; // @replace substring='null' replacement="..."
final LongChromosome halved = chromosome.map(Main::half);

static long[] half(final long[] values) {
    for (int i = 0; i < values.length; ++i) {
        values[i] /= 2;
    }
    return values;
}
}

@since 6.1

@param f the mapper function
@return a newly created chromosome with the mapped gene values
@throws NullPointerException if the mapper function is {@code null}.
@throws IllegalArgumentException if the length of the mapped
        {@code long[]} array is empty or doesn't match with the allowed
        length range
jenetics/src/main/java/io/jenetics/LongChromosome.java