Created
April 30, 2015 01:45
-
-
Save latkin/361c59a7582e390167c7 to your computer and use it in GitHub Desktop.
Scoping nonstructural operators
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
[<AutoOpen>] | |
module Ops = | |
open NonStructuralComparison | |
let inline nsHash x = hash x | |
let inline nsCompare x = compare x | |
let inline (=&) a b = a = b | |
let inline (<>&) a b = a <> b | |
let inline (<&) a b = a < b | |
let inline (>&) a b = a > b | |
let inline (<=&) a b = a <= b | |
let inline (>=&) a b = a >= b | |
let now = System.DateTime.Now | |
let tom = now.AddDays(1.) | |
(now = now) |> printfn "%b" | |
(now =& now) |> printfn "%b" | |
(now <> tom) |> printfn "%b" | |
(now <>& tom) |> printfn "%b" | |
(now < tom) |> printfn "%b" | |
(now <& tom) |> printfn "%b" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment