@Test
public void example2() {

	final Codec<LocalDate, LongGene> dateCodec = Codec.of(
		Genotype.of(LongChromosome.of(0, 10_000)),
		gt -> LocalDate.ofEpochDay(gt.gene().longValue())
	);
	final Codec<Duration, LongGene> durationCodec = Codec.of(
		ISeq.of(dateCodec, dateCodec, dateCodec),
		dates -> {
			final LocalDate ld1 = (LocalDate)dates[0];
			final LocalDate ld2 = (LocalDate)dates[1];
			final LocalDate ld3 = (LocalDate)dates[2];
			return Duration.ofDays(
				ld1.toEpochDay() + ld2.toEpochDay() - ld3.toEpochDay()
			);
		}
	);
	final Engine<LongGene, Long> engine = Engine
		.builder(Duration::toMillis, durationCodec)
		.build();
	final Phenotype<LongGene, Long> pt = engine.stream()
		.limit(100)
		.collect(EvolutionResult.toBestPhenotype());
	//System.out.println(pt);
	final Duration duration = durationCodec.decoder()
		.apply(pt.genotype());
	//System.out.println(duration);
}