From da8f1674316dfc43fb0eb87e5f9d09b2cc942374 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 25 Sep 2013 16:28:21 -0400 Subject: [PATCH] Define cell signature. --- polymorphic-life/001/src/polymorphic_life.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/polymorphic-life/001/src/polymorphic_life.ml b/polymorphic-life/001/src/polymorphic_life.ml index a667bc4..ca6d819 100644 --- a/polymorphic-life/001/src/polymorphic_life.ml +++ b/polymorphic-life/001/src/polymorphic_life.ml @@ -47,6 +47,15 @@ module Matrix : MATRIX = struct end +module type CELL = sig + type t + + val state : t -> int + + val react : t -> states:int list -> t +end + + let main () = let pool = Matrix.create ~rows:5 ~cols:5 ~data:() in Matrix.iter pool ~f:( -- 2.20.1