Created
July 12, 2016 07:40
-
-
Save isaacabraham/656d64a25fa98922afb9fbf3a9c669bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r @"packages\FSharp.Data\lib\net40\FSharp.Data.dll" | |
open FSharp.Data | |
open System | |
type DreamTheater = HtmlProvider< @"https://en.wikipedia.org/wiki/List_of_songs_recorded_by_Dream_Theater"> | |
DreamTheater | |
.GetSample() | |
.Tables | |
.List | |
.Rows | |
|> Seq.map(fun r -> r.Title.Replace("\"", ""), r.Length.Split ':') | |
|> Seq.choose(function | |
| title, [| mins; seconds |] -> Some (title, TimeSpan(0, int mins, int seconds)) | |
| _ -> None) | |
|> Seq.sortByDescending snd | |
|> Seq.toArray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment