F#

1,泛型类

type TimeSeriesQueue<'V,'K when'K: comparison>(getKey :'V ->'K)=let daysInCache =7let cache = ref Map.empty

  member x.Foo()=()

2,泛型类,要求实现接口
type Foo<'a when'a :> IComparable>=member x.Bla =0
原文地址:https://www.cnblogs.com/xiwang/p/3590852.html