Created
September 4, 2022 21:49
-
-
Save rugyoga/4ef2e004bf106581b0fc6fae8e475bc7 to your computer and use it in GitHub Desktop.
Take delta of two structs
This file contains 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_struct(path(), struct(), struct()) :: delta_spec() | |
def delta_struct(path, %a_s{} = a, %b_s{} = b) when a_s != b_s, do: delta_simple(path, a, b) | |
def delta_struct(path, a, b), do: delta_map(path, Map.from_struct(a), Map.from_struct(b)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment