A genetic algorithm in erlang for solving a curve fitting problem