..] . foldi (\(x:xs) ys -> x : union xs ys) [] _Y g = g (_Y g) -- = g . g . g . g . ...这里的函数codice_53以本地方式运算于有序列表之上来高效的产生它们的并集，而codice_54 做它们的集合差。对于有限列表，归并排序（和它的去除重复变体codice_55）可以使用树状折叠轻易的定义为：mergesort xs = foldt merge [] [[x] | x <- xs]nubsort xs