Created
June 28, 2009 03:51
-
-
Save eklitzke/137194 to your computer and use it in GitHub Desktop.
This file contains 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 characters
type Ctx = Map String Double | |
fetch :: Ctx -> String -> Double | |
fetch = fromJust . lookup | |
data Orbit = Orbit IORef Position Velocity | |
class AltStrategy s where | |
impulse :: s -> Ctx -> Orbit -> IO (Ctx, Double, Double) | |
isDone :: s -> OuputPorts -> Bool | |
isDone _ ports = (fromJust $ lookup 0 ports) /= 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment