mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Define run by iteration.
This commit is contained in:
parent
209e7c0896
commit
4992299dd8
@ -26,7 +26,7 @@ diffTerms = (run .) . diff
|
||||
run :: (Eq leaf, HasField fields Category, HasField fields (Maybe FeatureVector))
|
||||
=> Algorithm (SyntaxTerm leaf fields) (SyntaxDiff leaf fields) result
|
||||
-> result
|
||||
run = either identity run . runStep
|
||||
run = iterFreer (\ algorithm cont -> cont (run (decompose algorithm)))
|
||||
|
||||
-- | Run an Algorithm to completion, returning the list of steps taken.
|
||||
runSteps :: (Eq leaf, HasField fields Category, HasField fields (Maybe FeatureVector))
|
||||
|
Loading…
Reference in New Issue
Block a user