Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created April 3, 2017 20:57
Show Gist options
  • Save selcukusta/80ab2fa95310542efb5ae834bc4a0595 to your computer and use it in GitHub Desktop.
Save selcukusta/80ab2fa95310542efb5ae834bc4a0595 to your computer and use it in GitHub Desktop.
let source =
(
[| for row in fifaWiki.Tables.``All-time table``.Rows ->
row.``Name of Team``, row.Pld, row.GF |]
|> Array.map(fun(name, numberOfMatches, goalsFor) ->
let teamName = System.Text.RegularExpressions.Regex.Replace(name, "\[\d+\]", "")
teamName, goalsFor, numberOfMatches)
|> Array.sortByDescending(fun(name, goals, matches) -> (goals))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment