Skip to content

Instantly share code, notes, and snippets.

@eklitzke
Forked from bickfordb/gist:137153
Created June 27, 2009 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eklitzke/137155 to your computer and use it in GitHub Desktop.
Save eklitzke/137155 to your computer and use it in GitHub Desktop.
class Strategy s where
storeOutput :: s -> Ports -> IO ()
nextInput :: s -> IO Ports
isDone :: s -> Bool
failed :: s -> Bool
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment