diff options
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) |