mirror of
https://github.com/alpmestan/taggy.git
synced 2024-09-11 15:05:40 +03:00
(Combinators.//) filters on trees, rather than subtrees.
This commit is contained in:
parent
e7487d337c
commit
4f9300ba12
@ -23,7 +23,7 @@ innerText = mconcat . map getContent . eltChildren
|
|||||||
where getContent = \case { NodeElement e -> innerText e; NodeContent x -> x }
|
where getContent = \case { NodeElement e -> innerText e; NodeContent x -> x }
|
||||||
|
|
||||||
(//) :: Element -> (Element -> Bool) -> [Element]
|
(//) :: Element -> (Element -> Bool) -> [Element]
|
||||||
(//) = flip filter . subtrees
|
(//) = flip filter . trees
|
||||||
|
|
||||||
(/&) :: Element -> [(Element -> Bool)] -> [Element]
|
(/&) :: Element -> [(Element -> Bool)] -> [Element]
|
||||||
(/&) element [] = [element]
|
(/&) element [] = [element]
|
||||||
|
Loading…
Reference in New Issue
Block a user