Advertisement
ptrelford

F# Map type extension

Jun 30th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.23 KB | None | 0 0
  1. module MapExt =
  2.    // Map type extension requires equivalent type constraint
  3.    type Map<'TKey,'TValue> when 'TKey : comparison with
  4.      // Extension method
  5.      member this.Foo () = ()
  6.  
  7. open MapExt
  8.  
  9. let x = Map.empty
  10. x.Foo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement