(Combinators.//) filters on trees, rather than subtrees.

This commit is contained in:
vi 2014-06-24 15:04:42 +08:00
parent e7487d337c
commit 4f9300ba12

View File

@ -23,7 +23,7 @@ innerText = mconcat . map getContent . eltChildren
where getContent = \case { NodeElement e -> innerText e; NodeContent x -> x }
(//) :: Element -> (Element -> Bool) -> [Element]
(//) = flip filter . subtrees
(//) = flip filter . trees
(/&) :: Element -> [(Element -> Bool)] -> [Element]
(/&) element [] = [element]