Skip to content

Instantly share code, notes, and snippets.

@isaacabraham
Created July 12, 2016 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacabraham/656d64a25fa98922afb9fbf3a9c669bb to your computer and use it in GitHub Desktop.
Save isaacabraham/656d64a25fa98922afb9fbf3a9c669bb to your computer and use it in GitHub Desktop.
#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