且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Haskell递归子集

更新时间:2023-02-27 08:33:40

最后一行说,x:xs的子集集是xs的子集集,而x都添加到了这些集中

The last line says that the set of subsets of x:xs is the set of subsets of xs along with x added to each of those sets.

另一种表达方式是

zs <- [ys,(x:ys)]

为每个xs的子集之一精确地生成两个集ysx:ys.

generates exactly two sets, ys and x:ys for each ys which is one of the subsets of xs.