home
/
code
/
cellular-automata.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable warning 44:
[cellular-automata.git]
/
polymorphic-life
/
001
/
src
/
polymorphic_life.ml
diff --git
a/polymorphic-life/001/src/polymorphic_life.ml
b/polymorphic-life/001/src/polymorphic_life.ml
index
e25bbf6
..
4a28992
100644
(file)
--- a/
polymorphic-life/001/src/polymorphic_life.ml
+++ b/
polymorphic-life/001/src/polymorphic_life.ml
@@
-85,7
+85,8
@@
module Conway : CELL = struct
| D -> " "
| A -> "o"
| D -> " "
| A -> "o"
- let init () = Random.int 2 |> of_int
+ let init () =
+ Random.int 2 |> of_int
let state = to_int
let state = to_int
@@
-96,7
+97,8
@@
module Conway : CELL = struct
| A when live_neighbors < 4 -> A
| A when live_neighbors > 3 -> D
| D when live_neighbors = 3 -> A
| A when live_neighbors < 4 -> A
| A when live_neighbors > 3 -> D
| D when live_neighbors = 3 -> A
- | t -> t
+ | A -> A
+ | D -> D
end
end
This page took
0.026659 seconds
and
4
git commands to generate.