Skip to content

Commit

Permalink
Re-order functions to reflect the order of the Python code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Pauley committed Mar 25, 2011
1 parent faad89c commit e684942
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sudoku.erl
Expand Up @@ -13,14 +13,14 @@ rows() ->
cols() ->
digits().

values(Puzzle, Square) ->
{Dict, _} = Puzzle,
dict:fetch(Square, Dict).

squares() ->
%% Returns a list of 81 square names, including "A1" etc.
cross(rows(), cols()).

values(Puzzle, Square) ->
{Dict, _} = Puzzle,
dict:fetch(Square, Dict).

col_squares() ->
%% All the square names for each column.
[cross(rows(), [C]) || C <- cols()].
Expand Down

0 comments on commit e684942

Please sign in to comment.