是否有一个抽象类filter
的类型类?
我在想类似的东西
class Filterable t where
filter :: (a -> Bool) -> t a -> t a
如果不是这种情况,是否有明确的原因?
最佳答案
是的,可悲的软件包provides Filterable
,带有一些常见类型的实例。
是否有一个抽象类filter
的类型类?
我在想类似的东西
class Filterable t where
filter :: (a -> Bool) -> t a -> t a
最佳答案
是的,可悲的软件包provides Filterable
,带有一些常见类型的实例。