Skip to content

Instantly share code, notes, and snippets.

View 7sharp9's full-sized avatar

Dave Thomas 7sharp9

  • Moirae Software Engineering Ltd
  • UK
  • X @7sharp9_
View GitHub Profile
@7sharp9
7sharp9 / tech001.fs
Created November 2, 2018 20:41
Introduction to quotations
open System
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns
open Microsoft.FSharp.Quotations.ExprShape
open Microsoft.FSharp.Quotations.DerivedPatterns
let qliteral =
<@
let addAndMultiply a b =
@7sharp9
7sharp9 / ActivePatterns.fs
Created November 20, 2018 21:35
Language Essentials Active Patterns
namespace ClassLibrary1
open System
module SingleCase =
//definition
let (|UpperCase|) (x:string) = x.ToUpper()
//PM usage
match "foo" with