Skip to content

Instantly share code, notes, and snippets.

View brianrourkeboll's full-sized avatar

Brian Rourke Boll brianrourkeboll

View GitHub Profile
#r "nuget: FSharp.Compiler.Service"
open FSharp.Compiler.Syntax
open FSharp.Compiler.SyntaxTrivia
open FSharp.Compiler.Xml
type Node =
{ Data : Data
Children : Node list }
@brianrourkeboll
brianrourkeboll / FoldBuilder_1.fsx
Last active May 21, 2024 18:50
Some experimental computation expression builds for expressing folds
open System
open System.Runtime.CompilerServices
#nowarn "1204"
[<CompilerMessage("This construct is for use by compiled F# code and should not be used directly.", 1204, IsHidden=true)>]
type FoldBuilderCode<'T> = delegate of byref<'T> -> unit
[<Struct; IsReadOnly; NoComparison; NoEquality>]
type FoldBuilder<'T> (state : 'T) =