Permalink
Browse files

Use __DIR__ and List.first.

  • Loading branch information...
1 parent 6f763b3 commit 391039d405bdffc37cab2b65a6b20164c633667f @seven1m committed Feb 2, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 16-euler-tree.exs
View
@@ -18,7 +18,7 @@ defmodule Tree do
row = reduce_row(row, comparison_row)
maximal_path([row | rest_rows])
end
- def maximal_path([row]), do: Enum.first(row)
+ def maximal_path([row]), do: List.first(row)
def from_file(filename) do
File.read!(filename)
@@ -87,7 +87,7 @@ ExUnit.start
defmodule TreeTest do
use ExUnit.Case
- @path Path.expand("../support/tree.txt", __FILE__)
+ @path Path.expand("support/tree.txt", __DIR__)
test "read file" do
tree = Tree.from_file(@path)

0 comments on commit 391039d

Please sign in to comment.