Last active
April 10, 2016 00:32
-
-
Save robmckinnon/d4fb106d8bd03d093ff4ef63151b7aa9 to your computer and use it in GitHub Desktop.
Elixir sandbox
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
quote do: String.downcase("THIS") | |
# {{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], ["THIS"]} | |
quote do: String.downcase("THIS") |> inspect | |
# {:|>, [context: Elixir, import: Kernel], | |
# [{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], | |
# ["THIS"]}, {:inspect, [], Elixir}]} | |
(quote do: String.downcase("THIS")) |> inspect | |
# "{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], [\"THIS\"]}" | |
(quote do: String.downcase("THIS")) |> inspect |> String.replace(~r({|}), "") | |
# ":., [], [:__aliases__, [alias: false], [:String], :downcase], [], [\"THIS\"]" | |
# mix.exs: | |
# | |
# ... | |
# defp deps do | |
# [ | |
# {:expand, ">= 0.0.3"} | |
# ] | |
# end | |
# ... | |
# iex -S mix | |
IO.puts Expand.it quote do: String.downcase("X") | |
# { | |
# { | |
# :., | |
# [ | |
# { | |
# :__aliases__, | |
# [ | |
# alias: | |
# false | |
# ], | |
# [ | |
# :String | |
# ] | |
# }, | |
# :downcase | |
# ] | |
# }, | |
# '', | |
# [ | |
# "X" | |
# ] | |
# } | |
# :ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment