Last active
September 25, 2021 17:52
-
-
Save palladin/e9aa83ea02588ed43bcb to your computer and use it in GitHub Desktop.
Overload
This file contains hidden or 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
type Term<'a>() = class end | |
type Tuples' = Tuples' with | |
static member inline (?<-) (_ : Tuples', _ : (Term<_> * Term<_>), _ : (Term<_> * Term<_>)) = 2 | |
static member inline (?<-) (_ : Tuples', a:Term<_>, b : Term<_>) = 4 | |
static member inline (?<-) (_ : Tuples', a:bool, b:bool) = 3 | |
static member inline (?<-) (_ : Tuples', a:string, b:string) = 1 | |
let inline call_2 (t:^t,a:^a,b:^b) : int = | |
(t ? (a) <- b ) | |
let t = call_2 (Tuples',Term<int>(),Term<int>()) | |
let t2 = call_2 (Tuples',(Term<int>(),Term<int>()),(Term<int>(),Term<int>())) | |
let t3 = call_2 (Tuples', true, false) | |
let inline call a b : int = | |
call_2 (Tuples', a, b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment