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
module ComMonad | |
//type ComOp<'T> = (unit -> 'T) | |
let private runCom t = t() | |
type Com = | |
static member Run t = runCom t | |
let private result t = (fun () -> t) | |
let private delay (f:unit->unit->'a) = (fun() -> f()()) |
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
//update the paths below to correctly reference the external resources | |
#r @"C:\ws\ReferenceAssemblies\Solver30\Microsoft.Solver.Foundation.dll" | |
#load @"C:\Users\Fai\Documents\Microsoft Solver Foundation\Samples\FSharp\SfsMeasures\SfsWrapper.fs" | |
;; | |
open Microsoft.SolverFoundation.Services | |
open Microsoft.SolverFoundation.SfsWrapper | |
;; | |
let sudokuPuzzle = | |
//9x9 matrix as list of 81 cells | |
//use 0 for blank cell |
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
module FsJson | |
open System | |
open System.Text.RegularExpressions | |
open System.Text | |
open System.IO | |
open System.Globalization | |
type Json = | |
| JsonObject of Map<string,Json> | |
| JsonString of String |
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\MathNet.Numerics.FSharp.4.8.1\lib\net45\MathNet.Numerics.FSharp.dll" | |
#r @"..\packages\MathNet.Numerics.4.8.1\lib\net461\MathNet.Numerics.dll" | |
#r @"..\packages\FSharp.Plotly.1.1.21\lib\net47\FSharp.Plotly.dll" | |
#r @"..\packages\FSharp.Data.3.1.1\lib\net45\FSharp.Data.dll" | |
open FSharp.Data | |
open MathNet.Numerics | |
open FSharp.Plotly | |
(* | |
Sample based on NY Taxi data |