Quantcast
Channel: Phil Trelford's Array - Sorted with F# custom operators
Viewing all articles
Browse latest Browse all 4

Bela Istok on Sorted with F# custom operators

$
0
0
I think a better option it's to sort by the played games, because if I played less games and have the same point I can obtain more points in the next match and not only sort by name in the case that I have the same points and the same Goal Average. Here is the code, need to change because the functions in F# changed for the Visual Studio Beta 2:

let s= table |> Array.sortWith (fun a b ->
let nameA, gpA, gdA, pointsA = a
let nameB, gpB, gdB, pointsB = b
pointsB - pointsA |? gdB - gdA |? gpA - gpB |? System.String.Compare(nameA, nameB))

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images