Skip to content

Instantly share code, notes, and snippets.

@danslapman
Last active December 11, 2023 23:22
Show Gist options
  • Save danslapman/3a1765503304f38761ca397f9027237f to your computer and use it in GitHub Desktop.
Save danslapman/3a1765503304f38761ca397f9027237f to your computer and use it in GitHub Desktop.
InlineOps
let inline is_null (x:^T when ^T : not struct) = obj.ReferenceEquals (x, null)
let inline (!>) (x:^a) : ^b = ((^a or ^b) : (static member op_Implicit : ^a -> ^b) x)
let inline (^) f x = f x
let inline (~%) x = ignore x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment