Explicit sort function.
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 25 Jul 2012 15:00:19 +0000 (11:00 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 25 Jul 2012 15:00:19 +0000 (11:00 -0400)
001/src/life_time.erl

index 851aa05..1b639a7 100644 (file)
@@ -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.