anchor.diff:  let getRandomSelection count (items:'a[])  =
       Array.init count (fun _ -> items.[random.Next(items.Length)])
   
  -
   let distance target peep =
       peep 
           |> Array.zip target
  
positive.code:         |> Array.sum
          |> (fun sum -> float sum / float target.Length)
  
      
  [<EntryPoint>]
  let main argv = 
  
      let text = "To be or not to be."
      let fitness = distance (text.ToCharArray())  
      
      let chars =  [|32..126|] |> Array.map char
      let createString() = getRandomSelection text.Length chars
  
      
      let popSize = 64
      let pop = 
          [| for i in [1..popSize] -> spawn fitness createString |]
  
      //let select p = printfn "select";  p
      //let breed cross = id
      let crossover first second = first
      let terminate item = false
  
      let x =  ga (fun _ -> spawn fitness createString) popSize select breed crossover terminate 
  
      printfn "%A" argv
      0 
  
negative.code: ﻿open System
  
  let sw = new System.Diagnostics.Stopwatch()
  sw.Start()
  
  let ga create popSize fitness select breed crossover terminate  = 
      let rec generate population generation nextUpdateTime =        
          let newPop =
              population
                  |> select
                  |> breed popSize crossover 
          
          let best = Array.head population
          let bestString = new String(fst best: char[])
          let bestFit = snd best
          let display () =  printfn "%s \n\n>completed generation %i %s %f" bestString generation (sw.Elapsed.ToString(@"hh\:mm\:ss\.fff")) bestFit
          let nextUpdateTime = 
              if DateTime.UtcNow > nextUpdateTime then
                  display ()
                  DateTime.UtcNow.AddSeconds(1.0)
              else
                  nextUpdateTime
          if terminate bestFit then
              display ()
              printfn "Done!" 
              Console.ReadKey() |> ignore
              newPop
          else
              generate newPop (generation + 1) nextUpdateTime
      let addFitness peep = (peep, fitness peep)
      let population = 
          Array.init popSize (fun _ -> addFitness (create ()))
      generate population 0 DateTime.MinValue
  
  let select population =
      population
          |> Array.sortBy (snd)
          |> Array.skip (population.Length / 2)
  
  let breed getMutationRate targetSize crossover population = [| 
      // will blow up of popSize < 2
      yield! population
      let popSize = Array.length population
      let random = new Random()
      let pickPoint () = Math.Pow(random.NextDouble(), 1.4)
      let pickFirst () = int (pickPoint () * float popSize)
      let pickSecond first =
          let pick = int (pickPoint () * float (popSize - 1))
          if pick < first then pick else pick + 1    
      let mutationRate = getMutationRate population
      for _ in [1..(targetSize - popSize)] do
          let first = pickFirst ()
          let second = pickSecond first
          yield crossover mutationRate population.[first] population.[second] |]
   
  let getMutationRate population = 0.5
  
  ///////////////
  
  