From c30cad07ce8feb92fbfdcd1f17c36a3e2515668c Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sun, 29 Sep 2013 11:44:42 -0400 Subject: [PATCH] This makes more sense in the morning. --- polymorphism/001/src/polymorphism.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/polymorphism/001/src/polymorphism.ml b/polymorphism/001/src/polymorphism.ml index aae480b..6fc0ba9 100644 --- a/polymorphism/001/src/polymorphism.ml +++ b/polymorphism/001/src/polymorphism.ml @@ -290,9 +290,8 @@ module ForestFire : RULE = struct let f = 0.000001 (* Probability of spontaneous ignition *) let p = 0.1 (* Probability of spontaneous growth *) - let is_probable = function - | probability when (Random.float 1.0) <= probability -> true - | _ -> false + let is_probable p = + (Random.float 1.0) <= p let next state ~burning_neighbors = match state, burning_neighbors with -- 2.20.1