sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
// General hints on defining types with constraints or invariants | |
// | |
// Just as in C#, use a private constructor | |
// and expose "factory" methods that enforce the constraints | |
// | |
// In F#, only classes can have private constructors with public members. | |
// | |
// If you want to use the record and DU types, the whole type becomes | |
// private, which means that you also need to provide: | |
// * a constructor function ("create"). |
1. Yaml configuration section | |
<?xml version="1.0" encoding="utf-8"?> | |
<akka.persistence> | |
<hocon> | |
<![CDATA[ | |
akka { | |
persistence{ | |
query.journal.sql { | |
max-buffer-size = 10000 |
module ChrisPenner where | |
import Data.Array ((!)) | |
import Data.Foldable (for_, foldl', maximumBy) | |
import Data.List (sort) | |
import Data.Map.Strict (Map) | |
import Data.Ord (comparing) | |
import qualified Data.Array as A | |
import qualified Data.Map.Strict as Map |
//open System.IO | |
//Directory.GetFiles(@"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11", "*.dll") | |
//|> Array.map (fun f -> $"""#r "{Path.GetFileName(f)}" """) | |
//|> Array.iter (printfn "%s") | |
#I @"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11" | |
#r "Microsoft.AspNetCore.Antiforgery.dll" | |
#r "Microsoft.AspNetCore.Authentication.Abstractions.dll" |
/// Non-empty trees. | |
type Tree<'a> = TreeNode of 'a * List<Tree<'a>> | |
/// Syntactic simulation of the `Tree` base functor. | |
let (|TreeNode_|) (a, ys) = (a, ys) | |
/// Regular catamorphism for `Tree`. | |
let rec cata f (TreeNode (a, ts)) = f a (ts |> List.map (cata f)) | |
/// Compute a result from a single `Tree` node while having access to a function which computes a result from a single |