mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Manually fuse elem and map in isParentOf
This commit is contained in:
parent
add49cda17
commit
71c0fcb737
1 changed files with 3 additions and 1 deletions
|
@ -430,7 +430,9 @@ getPathM t = do
|
||||||
return $ getPath (parentMap params) t
|
return $ getPath (parentMap params) t
|
||||||
|
|
||||||
isParentOf tree parent child =
|
isParentOf tree parent child =
|
||||||
elem (getId parent) . NE.map getId $ getPath tree child
|
any (\t -> parentId == getId t) (getPath tree child)
|
||||||
|
where
|
||||||
|
parentId = getId parent
|
||||||
|
|
||||||
parents params = getPath (parentMap params)
|
parents params = getPath (parentMap params)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue