Use find instead of listToMaybe and filter

This commit is contained in:
Joseph C. Sible 2023-10-16 00:06:53 -04:00
parent dc2f388310
commit 8b3c37aa36
1 changed files with 1 additions and 1 deletions

View File

@ -3320,7 +3320,7 @@ checkReturnAgainstZero params token =
isFirstCommandInFunction = fromMaybe False $ do
let path = getPath (parentMap params) token
func <- listToMaybe $ filter isFunction path
func <- find isFunction path
cmd <- getClosestCommand (parentMap params) token
return $ getId cmd == getId (getFirstCommandInFunction func)