Permalink
Browse files

Use foreach where I care about the side-effect instead of the return …

…value
  • Loading branch information...
1 parent c1c9049 commit 232ffe47a6f9463ce64d216bb88b18b5166835a3 @apauley committed Sep 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 sudoku.erl
View
@@ -188,7 +188,7 @@ values_length({S, Values}) ->
solve_all(GridList) ->
PidGrids = [{spawn(fun server/0), Grid}
|| Grid <- GridList],
- [send_puzzle(PG) || PG <- PidGrids],
+ lists:foreach(fun send_puzzle/1, PidGrids),
[receive_solution(V) || V <- PidGrids].
send_puzzle({Pid, Grid}) -> Pid ! {self(), solve, Grid}.

0 comments on commit 232ffe4

Please sign in to comment.