This file contains hidden or 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
open System.Collections.Generic | |
let csharpList = List<_>(); | |
csharpList.Add(2); | |
printf "%A" <| csharpList.[0] | |
let numbers = [1;2;3] |
This file contains hidden or 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
open System | |
type Item = O = 0 | X = 1 | A = 2 | |
let inline add char = function | |
| struct (Item.O,Item.O) -> struct (char, Item.O) | |
| x, Item.O -> x, char | |
| _, y -> y, char | |
This file contains hidden or 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
open System | |
open Akka.Actor | |
open Akka.Configuration | |
open Akka.Cluster | |
open Akka.Cluster.Tools.Singleton | |
open Akka.Cluster.Sharding | |
open Akka.Persistence | |
open Akka.Persistence.Sqlite |
This file contains hidden or 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
open System.IO | |
#r "paket: | |
nuget Fake.IO.FileSystem | |
nuget Fake.Core.Trace | |
nuget FSharp.Data | |
nuget Fable.React | |
nuget FSharp.Literate | |
nuget Fake.Core.Target //" | |
#load ".fake/blog.fsx/intellisense.fsx" |
This file contains hidden or 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/Selenium.WebDriver/lib/netstandard2.0/WebDriver.dll" | |
#r "packages/canopy/lib/netstandard2.0/canopy.dll" | |
#r "packages/Newtonsoft.Json/lib/netstandard2.0/Newtonsoft.Json.dll" | |
//these are similar to C# using statements | |
open canopy.runner.classic | |
open canopy.classic | |
canopy.configuration.chromeDir <- @"." |
This file contains hidden or 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
open TickSpec | |
open Akkling | |
open Akkling.TestKit | |
open Akkling.Streams | |
open Akka.Streams | |
open Akka.TestKit.Xunit2 | |
open CSVParser | |
open Swensen.Unquote | |
open System |
This file contains hidden or 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
let foreachAsync parallelCount action = | |
let asyncF = | |
fun input -> | |
async { | |
do! action input | |
return Akka.NotUsed.Instance | |
} | |
Flow.empty | |
|> Flow.asyncMap parallelCount asyncF | |
|> Flow.toMat Sink.ignore Keep.right |
This file contains hidden or 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 App | |
open Fable.Core | |
open Browser | |
open Browser.Types | |
open Fable.Core.JsInterop | |
open Fable.Core.JS | |
open Fable.Core.DynamicExtensions | |
[<AllowNullLiteral>] | |
type HTMLTemplateElement = |
This file contains hidden or 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
type State<'st,'a> = | |
| Ok of 'a * 'st | |
| Error of ErrorState | |
and ErrorState = string | |
type S<'st,'a> = 'st -> State<'st,'a> | |
and StateMonadBuilder() = | |
member b.Return(x) : S<_,_> = fun s -> Ok (x, s) | |
member b.ReturnFrom(x) = x |
This file contains hidden or 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
open System | |
type ReadInput = unit -> int | |
type ReadInputR = unit -> Result<int,string> | |
type Process = int -> int | |
type ProcessR = Result<int,string> -> Result<int,string> |