Simplify an overcomplicated filtering function (#6115)
There's no need to use `catMaybes`, `uncurry`, `bool`, etc., just to get elements where the second element of a tuple is True.
This commit is contained in:
parent
9c12024e07
commit
30c8980883
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ filterChildrenName' :: (NameSpaceID nsID)
|
|||
filterChildrenName' nsID f = getCurrentElement
|
||||
>>> arr XML.elChildren
|
||||
>>> iterateS (keepingTheValue (elemNameMatches nsID f))
|
||||
>>> arr (catMaybes . fmap (uncurry $ bool Nothing . Just))
|
||||
>>> arr (map fst . filter snd)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Attributes
|
||||
|
|
Loading…
Add table
Reference in a new issue