var x = 10
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 Kickoff = Kickoff with | |
static member inline ($) (Kickoff, x: FsHttp.DslCE.LazyHttpBuilder<'context>) = | |
x |> Request.send | |
static member inline ($) (Kickoff, x: FsHttp.Domain.IToRequest) = | |
x |> Request.send | |
let inline kickoff x = (($) Kickoff) x | |
let inline (~%) x = kickoff x |
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
(* | |
Script for the Video: | |
"Roll Your Own „For“-Comprehension: Column-Wise, Not Nested" | |
YT-Link: https://www.youtube.com/watch?v=Qs8Z4B19ha0 | |
*) | |
// Given: | |
let seq1 = [ 1; 2; 3 ] |
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
#r "nuget: FsHttp" | |
#r "nuget: FSharp.Data" | |
open FsHttp | |
open FsHttp.Operators | |
open FSharp.Data | |
let url = "https://public-api.wordpress.com/wpcom/v2/sites/15048173/articles | |
?className=is-style-borders |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"background": "#c386f1", | |
"foreground": "#ffffff", | |
"leading_diamond": "\ue0b6", |
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 MaxOneYield = | |
// -------------------------------------------- | |
// Recipe for a builder that limits | |
// the number of yields to a maximum of one. | |
// -------------------------------------------- | |
// We need a distinct type for a "Zero" element. | |
type ZeroChild = ZeroChild | |
type MaxOneChildBuilder() = |
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
/// Pseudo custom operation that can be yielded | |
type Ops = | |
| Clear | |
// Since the typical CE builder is a singleton with keyword-like | |
// semantics, the builder instance cannot carry it's own state. | |
// As a workaround, we can model the state (mutable in this case) | |
// and pass it along the computation (omehow a reader monad-like | |
// thing with with unit as result type + mutation). | |
// The "Run" builder method is then the instanciation of the |
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 FslangSuggestion1178 | |
type Hero = | |
| AH | |
| GM | |
| NT | |
module Hero = | |
let inline convert x = | |
function |
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
#r "nuget: FuncyDown" | |
open FuncyDown.Element | |
open FuncyDown.Document | |
module ReadmeSample = | |
let badges = | |
""" | |
[![license](https://img.shields.io/github/license/GDATASoftwareAG/FuncyDown.svg)](https://raw.githubusercontent.com/GDATASoftwareAG/FuncyDown/master/LICENSE) |
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 ListComprehensions | |
// sehr einfach! | |
let result = | |
let a = 10 | |
let b = 20 | |
let c = 30 | |
a + b + c | |
// könnte man auch so schreiben: |
NewerOlder