Advertisement
Guest User

Untitled

a guest
Sep 9th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.39 KB | None | 0 0
  1. type ProperNum =
  2.     | ProperNum
  3.     static member instance (ProperNum, ProperNum, _) = fun () -> ()
  4.     static member instance (ProperNum, _ : Zero, _) = fun () -> Zero
  5.     static member inline instance (ProperNum, _ : Succ<'a>, _) = fun () -> Succ(Inline.instance(ProperNum, Unchecked.defaultof<'a>) ())
  6.  
  7. let inline instance() : 'a = Inline.instance(ProperNum, Unchecked.defaultof<'a>) ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement