Skip to content

Commit

Permalink
Merge pull request #148 from dalexj/fix-saddle-points-test
Browse files Browse the repository at this point in the history
Fix saddle points test
  • Loading branch information
parkerl committed Mar 21, 2016
2 parents 06977a1 + 9cafa0d commit 3867a18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions exercises/saddle-points/example.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ defmodule Matrix do
@spec rows(String.t()) :: [[integer]]
def rows(str) do
str
|> String.split("\n", trim: true)
|> String.split("\n")
|> Enum.map(&parse_row/1)
end

defp parse_row(str) do
str
|> String.split(" ", trim: true)
|> String.split(" ")
|> Enum.map(&String.to_integer/1)
end

Expand Down
2 changes: 1 addition & 1 deletion exercises/saddle-points/saddle_points_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule SaddlePointsTest do

@tag :pending
test "extract a column" do
columns = Matrix.columns("1 2 3\n4 5 6\n7 8 9\n 8 7 6")
columns = Matrix.columns("1 2 3\n4 5 6\n7 8 9\n8 7 6")
assert Enum.at(columns, 0) == [1, 4, 7, 8]
end

Expand Down

0 comments on commit 3867a18

Please sign in to comment.