Skip to content
Permalink
Browse files

step further to simplify code by hoisting pattern matching to functio…

…n parameter
  • Loading branch information
Maples7 committed Jun 15, 2019
1 parent c19d49f commit 21b1fee30f439628139f307157341812b52a237d
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/field_mask.ex
@@ -183,8 +183,7 @@ defmodule FieldMask do
acc -> {:cont, {Enum.reverse(acc), nil}, []}
end
)
|> Enum.reduce([], fn item, acc ->
{chars, delimiter} = item
|> Enum.reduce([], fn {chars, delimiter}, acc ->
[delimiter, Enum.join(chars) | acc]
end)
|> Enum.reverse()

0 comments on commit 21b1fee

Please sign in to comment.
You can’t perform that action at this time.