Genetic Algorithms in Elixir: argument order (page 30)

@seanmor5 call on page 30 doesn’t match function signature defined on page 28.

Page 28

def run(genotype, fitness_function, max_fitness, opts \\ []) do

Page 30

soln =, genotype, max_fitness)

Thanks for pointing this out! Swapping fitness_function and genotype will fix this. I’ll mark this for the next version as well!

@seanmor5 Just noticed this as well and found my way here. Error still appearing on just-purchased book (April 2022).