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:
eec4cd1
)
Explicit sort function.
author
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 25 Jul 2012 15:00:19 +0000
(11:00 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 25 Jul 2012 15:00:19 +0000
(11:00 -0400)
001/src/life_time.erl
patch
|
blob
|
blame
|
history
diff --git
a/001/src/life_time.erl
b/001/src/life_time.erl
index
851aa05
..
1b639a7
100644
(file)
--- a/
001/src/life_time.erl
+++ b/
001/src/life_time.erl
@@
-99,7
+99,10
@@
handle_cast({tock, {ID, CellState}},
case NewRepliesPending of
0 ->
NewGenCount = GenCount + 1,
- SortedStatePairs = lists:sort(NewStatePairs),
+ SortedStatePairs = lists:sort(
+ fun({A, _}, {B, _}) -> A < B end,
+ NewStatePairs
+ ),
StateChars = [state_to_char(S) || {_, S} <- SortedStatePairs],
ok = io:format(
This page took
0.027523 seconds
and
4
git commands to generate.