Created
June 27, 2009 23:02
Revisions
-
eklitzke revised this gist
Jun 27, 2009 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,4 @@ run :: Strategy s => s -> IO [Ports] run world = let loop = do w' = next world if isDone w' then fetch w' else loop w' in loop world -
eklitzke created this gist
Jun 27, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ class Strategy s where store :: s -> Ports -> IO () fetch :: s -> IO [Ports] isDone :: Ports -> Bool updatePorts :: Ports -> IO Ports next :: s -> s run :: Strategy s => s -> IO [Ports] run world = let loop = do w' = next world if isDone w' then fetch w' else loop in loop