Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我们看containers包装。他们有Data.Map.Strict,但没有等价物Data.Set.Strict。它的存在有意义吗?
containers
Data.Map.Strict
Data.Set.Strict
Set是严格的。以同样的方式,两者Map.Lazy和Map.Strict都是严格的关键。例如来自Data.Map.Lazy模块:
Set
Map.Lazy
Map.Strict
Data.Map.Lazy
该模块满足以下严格性属性: 关键参数被评估为 WHNF
该模块满足以下严格性属性:
原因很明显:要做出任何决定(即除了总是 return 之外的其他东西EQ),compare必须至少评估一个 WHNF 的参数(以将不同的构造函数分隔为 sum 类型,例如)
EQ
compare