home
/
code
/
cellular-automata.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86e687a
)
Right... THAT's how you pass a curried infix.
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 3 Sep 2012 21:31:08 +0000
(17:31 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 3 Sep 2012 21:31:08 +0000
(17:31 -0400)
forest-fire/001/src/forest_fire.ml
patch
|
blob
|
blame
|
history
diff --git
a/forest-fire/001/src/forest_fire.ml
b/forest-fire/001/src/forest_fire.ml
index
3cee973
..
bd2ed19
100644
(file)
--- a/
forest-fire/001/src/forest_fire.ml
+++ b/
forest-fire/001/src/forest_fire.ml
@@
-168,7
+168,7
@@
let next_generation forest (width, height) prob =
let neighbors = List.map (fun (ox, oy) -> ox + ix, oy + iy) offsets in
let neighbors = List.filter (is_onside width height) neighbors in
let neighbor_states = List.map (fun (x, y) -> forest.(y).(x)) neighbors in
- let burning_states = List.filter (
fun s -> s ==
Burning) neighbor_states in
+ let burning_states = List.filter (
(==)
Burning) neighbor_states in
new_state (state, (List.length burning_states), prob)
)
row
This page took
0.027429 seconds
and
4
git commands to generate.