Created
June 24, 2013 12:30
-
-
Save josevalim/5849709 to your computer and use it in GitHub Desktop.
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
defp escape({ left, meta, right }) do | |
{ '{}', meta, [escape(left), meta, escape(right)] } | |
end | |
defp escape({ left, right }) do | |
{ escape(left), escape(right) } | |
end | |
defp escape(list) when is_list(list) do | |
Enum.map(list, escape(&1)) | |
end | |
defp escape(other) do | |
other | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment