From dea3df894c3654b0b36e972dba4ed365b8b9e5ce Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 23 Feb 2016 04:19:45 +0100 Subject: [PATCH] Fix off-by-one in e --- src/Data/Number/Functions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Number/Functions.hs b/src/Data/Number/Functions.hs index d6961ef..46fa429 100644 --- a/src/Data/Number/Functions.hs +++ b/src/Data/Number/Functions.hs @@ -61,7 +61,7 @@ toList (x:|xs) = x : toList xs -- -- <> e :: Number -e = fmap a σ where +e = 1 + fmap a σ where a n | p == 0 = 2*q | otherwise = 1 where (q, p) = quotRem n 3