Add primitive iteration count CLI argument

This commit is contained in:
David Pätzel 2019-10-18 13:37:16 +02:00
parent 303120f54a
commit 958bbf25b7

View File

@ -12,9 +12,11 @@ mkPop = population 100 (I prios [])
main :: IO ()
main = do
args <- getArgs
let t = fromMaybe 100 $ headMay args >>= readMaybe
hSetBuffering stdout NoBuffering
pop <- mkPop
pop' <- runEffect $ for (run 2 1 pop (steps 100)) log
pop' <- runEffect $ for (run 2 1 pop (steps t)) log
res <- bests 5 pop'
sequence_ $ format <$> res
where