Skip to content

Instantly share code, notes, and snippets.

@rugyoga
Created September 4, 2022 22:22
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/16e0381d0c0e0273c1aa0f9ca97e7ba2 to your computer and use it in GitHub Desktop.
Save rugyoga/16e0381d0c0e0273c1aa0f9ca97e7ba2 to your computer and use it in GitHub Desktop.
Take the delta of two tuples
@spec delta_tuple(path(), tuple(), tuple()) :: [delta()]
defp delta_tuple(path, a, b) when tuple_size(a) != tuple_size(b), do: delta_simple(path, a, b)
defp delta_tuple(path, a, b), do: delta_list(path, Tuple.to_list(a), Tuple.to_list(b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment