anchor.diff:          squaredEuclideanDistance a b |> sqrt
   
       type Vector = float[]
  +
  +    module VectorOps = 
  +        let (+) (left: Vector) (right: Vector) : Vector =
  +            Array.zip left right |> Array.map (fun (l, r) -> l + r)
  +
  +        let (*) (v: Vector) (scale: float) : Vector = v |> Array.map ((*) scale)
  +
  +        let (/) (v: Vector) (scale: float) : Vector = v * (1.0/scale)
  +
  +        let zeroVector n : Vector = [|for i in 1..n do yield 0.0|]
  +
  +        let mean (n: int) (vectors: Vector array) =
  +            if vectors.Length <> 0 then
  +                ( vectors |> Array.reduce (fun acc v -> acc + v) ) / float(vectors.Length)
  +            else
  +                zeroVector(n)
           
       type AthenaKMeans<'a>(distance: float[] -> float[] -> float) =
   
  
positive.code: 
          let rng = System.Random()
  
          let ``kmeans++`` matrix k m n =
              
              let rec buildCentroids(centroids: float[] list)(i: int)=
                  if i < k then 
                      let distanceToClosestCentroid(v: Vector): float = centroids |> List.map (squaredEuclideanDistance v) |> List.min
  
                      let dx2 = matrix |> Array.map distanceToClosestCentroid
  
                      let border = rng.NextDouble() * Array.sum(dx2)
  
                      let rec nextCentroid runningSum idx =
                          if runningSum < border then nextCentroid (runningSum+dx2.[idx]) (idx+1)
                          else matrix.[idx-1]
                  
                      let next = nextCentroid 0.0 0
  
                      buildCentroids (next::centroids) (i+1)
                  else
                      centroids
              
              buildCentroids [matrix.[rng.Next(m)]] 0
                  
          let compute(matrix: float[][])(k: int): int[] =
  
              let m = matrix.Length
              let n = matrix.[0].Length
              let centroids = ``kmeans++`` matrix k m n
  
              let rec iterate result =
                  // I. assignment step
                  // II. update step
                  0
  
              [||]
  
          interface FotM.Utilities.IKMeans<'a> with
              member this.ComputeGroups(dataSet, nGroups) =
  
negative.code: ﻿namespace FotM.Athena
  
  // extensions
  
  module Seq =
      let mini s = s |> Seq.mapi (fun i x -> (i, x)) |> Seq.minBy snd
      let miniBy f s = s |> Seq.mapi (fun i x -> (i, f(x))) |> Seq.minBy snd
  
  module List =
      let mini s = s |> List.mapi (fun i x -> (i, x)) |> List.minBy snd
      let miniBy f s = s |> List.mapi (fun i x -> (i, f(x))) |> List.minBy snd
  
  module Array =
      let mini s = s |> Array.mapi (fun i x -> (i, x)) |> Array.minBy snd
      let miniBy f s = s |> Array.mapi (fun i x -> (i, f(x))) |> Array.minBy snd
  
  module Math =
      let n_choose_k n k = 
  