forked from GitHub/gf-core
pt -nub to remove duplicate trees from a list returned e.g. by a parser
This commit is contained in:
@@ -22,6 +22,8 @@ allTreeOps pgf = [
|
|||||||
Left $ nub . concatMap (paraphrase pgf))),
|
Left $ nub . concatMap (paraphrase pgf))),
|
||||||
("largest",("sort trees from largest to smallest, in number of nodes",
|
("largest",("sort trees from largest to smallest, in number of nodes",
|
||||||
Left $ largest)),
|
Left $ largest)),
|
||||||
|
("nub",("remove duplicate trees",
|
||||||
|
Left $ nub)),
|
||||||
("smallest",("sort trees from smallest to largest, in number of nodes",
|
("smallest",("sort trees from smallest to largest, in number of nodes",
|
||||||
Left $ smallest)),
|
Left $ smallest)),
|
||||||
("subtrees",("return all fully applied subtrees (stopping at abstractions), by default sorted from the largest",
|
("subtrees",("return all fully applied subtrees (stopping at abstractions), by default sorted from the largest",
|
||||||
|
|||||||
Reference in New Issue
Block a user