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 TypeclassopediaFable | |
| // --- HKT core (blog version) --- | |
| type App<'F,'t> = App of obj | |
| module HKT = | |
| let inline private assoc<'F,'a,'Fa | |
| when 'F : (static member Assign : App<'F,'a> * 'Fa -> unit)> = () | |
| let inline pack (value:'Fa) : App<'F,'a> = assoc<'F,'a,'Fa> ; App value | |
| let inline unpack (App v : App<'F,'a>) : 'Fa = assoc<'F,'a,'Fa> ; unbox v |
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 ObservingScheduler | |
| open System | |
| open System.Threading | |
| open Akka.Actor | |
| open Akka.Configuration | |
| open Akka.Event | |
| open Akka.TestKit |
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
| // See https://aka.ms/new-console-template for more information | |
| using Akka.Actor; | |
| using Akka.Streams; | |
| using Akka.Streams.Dsl; | |
| // Create an ActorSystem | |
| using var system = ActorSystem.Create("StreamSystem"); | |
| // Create a Materializer | |
| using var materializer = system.Materializer(); |
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
| using Marten; | |
| using Marten.Events.Aggregation; | |
| using Marten.Events.Projections; | |
| const string connectionString = | |
| "PORT = 5432; HOST = localhost; TIMEOUT = 15; POOLING = True; DATABASE = 'marten_cqrs_test'; USER ID = 'test'"; | |
| var documentStore = DocumentStore.For(options => | |
| { | |
| options.Connection(connectionString); |
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 FCQRS.Model.Data | |
| open FCQRS.Model.Aether | |
| open FCQRS.Model.Aether.Operators | |
| open FsToolkit.ErrorHandling | |
| module Domain = | |
| type FirstName = | |
| private | |
| | FirstName of ShortString |
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 Aether | |
| open System | |
| // ---------------------------------------------------------------------------- | |
| // Optics | |
| // ---------------------------------------------------------------------------- | |
| /// Lens from 'a -> 'b. | |
| type Lens<'a,'b> = |
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 Aether | |
| open System | |
| // Optics | |
| /// Lens from 'a -> 'b. | |
| type Lens<'a,'b> = | |
| ('a -> 'b) * ('b -> 'a -> 'a) |
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 Aether | |
| open System | |
| // Optics | |
| /// Lens from 'a -> 'b. | |
| type Lens<'a,'b> = | |
| ('a -> 'b) * ('b -> 'a -> 'a) |
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
| // ----------------------------- | |
| // 1) Lazy List | |
| // ----------------------------- | |
| type 'a lazyList = | |
| | LNil | |
| | LCons of Lazy<'a * 'a lazyList> | |
| module LazyList = | |
| let cons x xs = LCons(lazy (x, xs)) | |
| let empty<'a> : 'a lazyList = LNil |
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 Aether | |
| open System | |
| // Optics | |
| /// Lens from 'a -> 'b. | |
| type Lens<'a,'b> = | |
| ('a -> 'b) * ('b -> 'a -> 'a) |
NewerOlder