home
/
code
/
cellular-automata.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-align stuff.
[cellular-automata.git]
/
polymorphism
/
001
/
src
/
polymorphism.ml
diff --git
a/polymorphism/001/src/polymorphism.ml
b/polymorphism/001/src/polymorphism.ml
index
ab2cbd5
..
d292e28
100644
(file)
--- a/
polymorphism/001/src/polymorphism.ml
+++ b/
polymorphism/001/src/polymorphism.ml
@@
-264,8
+264,8
@@
struct
Random.int 2 |> State.of_int |> State.to_cell
let count_of_live =
Random.int 2 |> State.of_int |> State.to_cell
let count_of_live =
- List.map
~f:State.of_cell_state
- |- List.filter
~f:State.is_alive
+ List.map ~f:State.of_cell_state
+ |- List.filter ~f:State.is_alive
|- List.length
let transition ~self ~neighbors =
|- List.length
let transition ~self ~neighbors =
@@
-346,8
+346,8
@@
struct
Random.int 3 |> State.of_int |> State.to_cell
let count_of_burning =
Random.int 3 |> State.of_int |> State.to_cell
let count_of_burning =
- List.map
~f:State.of_cell_state
- |- List.filter
~f:State.is_burning
+ List.map ~f:State.of_cell_state
+ |- List.filter ~f:State.is_burning
|- List.length
let transition ~self ~neighbors =
|- List.length
let transition ~self ~neighbors =
This page took
0.016733 seconds
and
4
git commands to generate.