Skip to content

Commit

Permalink
rename variable h to head and t to tail
Browse files Browse the repository at this point in the history
  • Loading branch information
balexand committed May 29, 2020
1 parent 1d4442b commit bd6884d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shopify/enumerable.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ defmodule Shopify.Enumerable do
end
end

def reduce(%Shopify.Enumerable{data: [h | t]} = enum, {:cont, acc}, fun) do
reduce(%{enum | data: t}, fun.(h, acc), fun)
def reduce(%Shopify.Enumerable{data: [head | tail]} = enum, {:cont, acc}, fun) do
reduce(%{enum | data: tail}, fun.(head, acc), fun)
end
end
end

0 comments on commit bd6884d

Please sign in to comment.