Guest User

Untitled

a guest
Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. // let inline foreach f (o:^T when ^T :(member Item : int)) =
  3. let inline foreach f o =
  4. for i in 0 .. (^T:(member get_Length:int)o) do
  5. let x = (^T:(member get_Item:int->int->unit)(o,i))
  6. // x
  7. // (^T:(member get_Item:'a->unit) o)
  8. ()
  9.  
  10. type Hoge =
  11. member o.Item
  12. with get(x:int,y:int) = ()
  13. and set(x:int,y:int) v = ()
  14.  
  15. open System.Reflection
  16. let t = typeof<Text.StringBuilder>
  17. for mi in t.GetProperties() do
  18. // if (string mi).Contains("get") then
  19. printfn "%A" mi
Add Comment
Please, Sign In to add comment