From 2be59dcf6e342e480b76a7c11e3ed5773bf4b9a1 Mon Sep 17 00:00:00 2001 From: daniel <jcpetruzza@gmail.com> Date: Thu, 30 Jan 2014 16:30:44 +0100 Subject: [PATCH] BUGFIX: CL formulas were being generated with an extra agent --- randcool/randcool.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randcool/randcool.hs b/randcool/randcool.hs index cfddcaf..d3eb3d3 100644 --- a/randcool/randcool.hs +++ b/randcool/randcool.hs @@ -102,7 +102,7 @@ gradesBetween from to = G <$> inRange (from,to) numAgents :: Nat -> Rand CL -numAgents n = CL <$> buildSet I.empty (n+1) +numAgents n = CL <$> buildSet I.empty n where buildSet !acc m | m <= 0 = pure acc -- GitLab