anchor.diff:  energy(Solution) ->
       L = length(Solution),
       Cs = [foldzip(drop(Solution, K), Solution)
  -        || K <- lists:seq(1, L-1)],
  +          || K <- lists:seq(1, L-1)],
       E = lists:foldl(fun (X, Acc) -> X*X + Acc end, 0, Cs),
       L*L*0.5/E.
   
   
  --spec recombination(solution(), solution(), sim_params()) -> {solution(), solution()}.
  +-spec recombination(solution(), solution(), sim_params()) ->
  +                           {solution(), solution()}.
   recombination(S1, S2, _SP) ->
  -    lists:unzip([recombination_features(F1, F2) || {F1, F2} <- lists:zip(S1, S2)]).
  +    Zipped = [recombination_features(F1, F2) || {F1, F2} <- lists:zip(S1, S2)],
  +    lists:unzip(Zipped).
   
   %% @doc Chooses a random order between the two initial features.
   -spec recombination_features(float(), float()) -> {float(), float()}.
  
positive.code:     end.
  
  best_flipped(Solution) ->
      FlippedSols = lists:map(fun (I) -> flip_nth(Solution,I) end,
                lists:seq(1, length(Solution))),
      First = hd(FlippedSols),
      InitAcc = {First, energy(First)},
      GetBest = fun (S, {AccSol, AccE}) ->
          E = energy(S),
          case E > AccE of
              true -> {S, E};
              _ -> {AccSol, AccE}
          end
      end,
      lists:foldl(GetBest, InitAcc, FlippedSols).
  
  flip_nth(Sol, N) ->
  
negative.code: -spec mutation(solution(), sim_params()) -> solution().
  mutation(Solution, SP) ->
      lists:map(fun(X) ->
                        case random:uniform() < SP#sim_params.mutation_rate of
                            true -> fnot(X);
                            _ -> X
                        end
                end, Solution).
  
  %% internal functions
  
  