Created
September 4, 2022 21:42
-
-
Save rugyoga/cc54433a49f1ba131ce32bbe736099ab to your computer and use it in GitHub Desktop.
Main entry point for difference engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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