Created
February 1, 2013 21:00
-
-
Save diegofrata/4694113 to your computer and use it in GitHub Desktop.
F# DivRem Operator
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
namespace System.Numerics | |
[<AutoOpen>] | |
module DivRem = | |
type DivRem = DivRem with | |
static member (/%) (x : int32, DivRem) = fun y -> System.Math.DivRem(x, y) | |
static member (/%) (x : int64, DivRem) = fun y -> System.Math.DivRem(x, y) | |
static member (/%) (x : bigint, DivRem) = fun y -> BigInteger.DivRem(x, y) | |
let inline (/%) x y = (x /% DivRem) y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment