A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'| #r "nuget: FSharp.Compiler.Service, 43.8.300" | |
| open FSharp.Compiler.Syntax | |
| open FSharp.Compiler.SyntaxTrivia | |
| open FSharp.Compiler.Xml | |
| open FSharp.Compiler.CodeAnalysis | |
| open System.IO | |
| type Node = | |
| { Data : Data |
| // 1. pure, don't think about IO at all | |
| module Domain = | |
| let add x y = x + y | |
| // 2. think about IO but not its implementation | |
| module App = | |
| let add (getX: unit -> Async<int32>) y = | |
| async { | |
| let! x = getX () | |
| return Domain.add x y |
| // ========= Event Sourcing in a nutshell | |
| (* | |
| FriendlyName: string | |
| Aggregate friendly name. | |
| Initial: 'State | |
| Initial (empty) state we will start with. | |
| Decide: 'Command -> 'State -> 'Event list |
| using System; | |
| using System.Runtime.CompilerServices; | |
| public class C { | |
| async async await(await async) => await async; | |
| } | |
| [AsyncMethodBuilder(typeof(builder))] | |
| class async { | |
| public awaiter GetAwaiter() => throw null; |
A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'| COPY src/*/*.csproj ./ | |
| RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done |
+----------------------+--------------------+--------------------+--------------------+
| Operation | F-Sharp | Compability | Haskell |
+======================+====================+====================+====================+
| List.append | @ | | ++ |
+----------------------+--------------------+--------------------+--------------------+
| Function composition | f << g | f . (g) | f . g |
+----------------------+--------------------+--------------------+--------------------+
| | = | == | == |
+----------------------+--------------------+--------------------+--------------------+
+--------------------+--------------------+-------------------------+--------------------+
|Operation | F#+ / F# |F#+ Haskell Compatibility|Haskell |
+====================+====================+=========================+====================+
|List.append | @ | | ++ |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g | f . (g) | f . g |
+--------------------+--------------------+-------------------------+--------------------+
| | <| | $ | $ |
+--------------------+--------------------+-------------------------+--------------------+
| <Project Sdk="Microsoft.NET.Sdk.Web"> | |
| <PropertyGroup> | |
| <!-- ... | |
| based on https://stackoverflow.com/questions/7643615/how-can-i-get-msbuild-to-copy-all-files-marked-as-content-to-a-folder-preservin | |
| --> | |
| <WWWRoot>$(ProjectDir)wwwroot</WWWRoot> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <!-- Specify a file collection WWWRootFiles: --> | |
| <WWWRootFiles Include="..\wwwroot\**\*.*"></WWWRootFiles> |