Created
October 9, 2016 18:06
-
-
Save boxxxie/4949ccb5cb5de0ad6ab367266fb54e9f to your computer and use it in GitHub Desktop.
in the below code, the is_map guard causes this code to take only that path, even when given a MapSet
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
def empty(%MapSet{}), do: MapSet.new() | |
def empty(obj) when is_map(obj), do: %{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment