1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

🔥 an unnecessary fmap.

This commit is contained in:
Rob Rix 2017-07-22 16:56:21 -04:00
parent 4a0fb31ba1
commit 8b63e54f6d

View File

@ -242,7 +242,7 @@ runAssignment toNode source assignment state = go assignment state >>= requireEx
-> (x -> State ast grammar -> Either (Error grammar) (result, State ast grammar))
-> State ast grammar
-> Either (Error grammar) (result, State ast grammar)
run assignment yield initialState = maybe (atEnd Nothing) atNode (F.project <$> listToMaybe (stateNodes state))
run assignment yield initialState = maybe (atEnd Nothing) (atNode . F.project) (listToMaybe (stateNodes state))
where atNode node = case assignment of
Location -> yield (nodeLocation (toNode node)) state
Project projection -> yield (projection node) state