From 7054599bbf955574fad1ae65cf6ab7eb117cfa17 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 7 Feb 2014 23:22:16 +1100 Subject: Fixed miscellaneous minor errors --- Fractran/Interpreter.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Fractran') 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) -- cgit