Skip to content

Instantly share code, notes, and snippets.

@rugyoga
Created September 4, 2022 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rugyoga/cc54433a49f1ba131ce32bbe736099ab to your computer and use it in GitHub Desktop.
Save rugyoga/cc54433a49f1ba131ce32bbe736099ab to your computer and use it in GitHub Desktop.
Main entry point for difference engine
@spec delta(any(), any()) :: delta_spec()
def delta(a, b) do
[]
|> delta(a, b)
|> List.flatten()
|> Enum.map(fn {path, element} -> {Enum.reverse(path), element} end)
|> Enum.sort_by(fn {path, _} -> {length(path), path} end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment