In the flip function this line of code:
%Chromosomes{genes: genes, size: chromosome.size}
should be
%Chromosome{genes: genes, size: chromosome.size}
In the flip function this line of code:
%Chromosomes{genes: genes, size: chromosome.size}
should be
%Chromosome{genes: genes, size: chromosome.size}