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
// Learn more about F# at http://fsharp.org | |
open System | |
open System.Threading.Tasks | |
let ( ^ ) f x = f x | |
type IStore = | |
abstract member Save: 'T -> Guid |
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
let inline ( ^ ) f x = f x | |
let debounce time f = | |
let loop = MailboxProcessor.Start ^ fun mailbox -> async { | |
let mutable lastMsg = None | |
while true do | |
let! msg = mailbox.TryReceive(time) | |
match msg with | |
| None when lastMsg.IsSome -> f lastMsg.Value |
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
type BuilderStep = | |
| SetupProxy = 1 | |
| SetupTimeouts = 2 | |
type DriverBuilder() = | |
let steps = Dictionary() | |
let driverOpt = ChromeOptions() | |
do |
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 CounterBot = | |
type State = int | |
type Msg = | |
| Increment | |
| Decrement | |
let init = 0 |
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
type IStore = | |
abstract member GetState : unit -> Async<'T> | |
abstract member SaveState: 'T -> Async<unit> | |
type IServiceProvider = | |
abstract member Resolve : unit -> 'T | |
type GetTodoListQuery = unit | |
type AddCommand = { Title: string; } | |
type RemoveCommand = { Id: Id; } |
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
open System | |
type Id = int | |
type TodoValue = | |
| Text of string | |
| Markdown of string | |
| Html of string | |
NewerOlder