diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-02-07 23:22:16 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-02-07 23:22:16 +1100 |
commit | 7054599bbf955574fad1ae65cf6ab7eb117cfa17 (patch) | |
tree | 4c2e156ac19ff46d427ec4779f58842ea449c6e8 /Fractran | |
parent | 862d0b8e2ad71c6cc6268608130167deff08dab7 (diff) |
Fixed miscellaneous minor errors
Diffstat (limited to 'Fractran')
-rw-r--r-- | Fractran/Interpreter.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Fractran/Interpreter.hs b/Fractran/Interpreter.hs index 0427aed..b62f279 100644 --- a/Fractran/Interpreter.hs +++ b/Fractran/Interpreter.hs @@ -19,5 +19,11 @@ fractran program = then newV : (f prog newV) else f (tail p) v) result = map round (f prog (fromIntegral (initialValue program))) - in value : result + in (initialValue program) : result + + + +isInt :: (RealFrac a) => a -> Bool +isInt x = + x == fromInteger (round x) |