Skip to content

Commit

Permalink
refactor to zip_reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
bradhanks committed Jan 15, 2024
1 parent daa31c4 commit 7e00359
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/kino/debug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ defmodule Kino.Debug do
assignments = quote do: unquote(head_var) = unquote(head_ast)

{assignments, _} =
rest_vars
|> Enum.zip(rest_asts)
|> Enum.reduce({assignments, head_var}, fn {var, node}, {assignments, prev_var} ->
Enum.zip_reduce(rest_vars, rest_asts, {assignments, head_var}, fn var, node, {assignments, prev_var} ->
assignments =
quote do
unquote(assignments)
Expand Down

0 comments on commit 7e00359

Please sign in to comment.