Created
March 3, 2017 07:23
-
-
Save ErikSchierboom/db43cf750a0a661b286544b8cb1a3470 to your computer and use it in GitHub Desktop.
Exercism Scala track with difficulties mapped from F# track
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.2.3.2/lib/net40/FSharp.Data.dll" | |
open FSharp.Data | |
type configJson = JsonProvider<"https://raw.githubusercontent.com/exercism/xscala/master/config.json"> | |
let scalaConfigJson = configJson.Load("https://raw.githubusercontent.com/exercism/xscala/master/config.json") | |
let fsharpConfigJson = configJson.Load("https://raw.githubusercontent.com/exercism/xfsharp/master/config.json") | |
let fsharpExerciseDifficulties = | |
fsharpConfigJson.Exercises | |
|> Array.map (fun x -> (x.Slug, x.Difficulty)) | |
|> Map.ofArray | |
let scalaExercises = | |
scalaConfigJson.Exercises | |
|> Array.map (fun x -> (x.Slug, Map.find x.Slug fsharpExerciseDifficulties)) | |
|> Array.iter (fun (slug, difficulty) -> printfn "- %s: %i" slug difficulty) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment