Skip to content

Instantly share code, notes, and snippets.

@adilakhter
Created Nov 21, 2012
Embed
What would you like to do?
modulo operator
let rec (|%|) a n =
match a, n with
|_ when a < n -> a
|_ when a>=n -> (|%|) (a-n) n
//Resulting signature: val ( |%| ) : int -> int -> int
@adilakhter
Copy link
Author

adilakhter commented Nov 21, 2012

symbol operator defined using fsharp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment