Implemented math portion of kmeans in F#