Created
September 4, 2022 21:49
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