Skip to content

Instantly share code, notes, and snippets.

@SchlenkR
Created April 22, 2024 14:01
Show Gist options
  • Save SchlenkR/5b698385f19ee1aeff8e520bb1d9830b to your computer and use it in GitHub Desktop.
Save SchlenkR/5b698385f19ee1aeff8e520bb1d9830b to your computer and use it in GitHub Desktop.
SRTP Operator Overloading Hack
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment