Created
March 20, 2014 15:10
-
-
Save eezis/9665961 to your computer and use it in GitHub Desktop.
Distinction between ' and " usage in Elixir?
This file contains hidden or 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
What are the "rules" or guidelines for using ' vs " in Elixir? | |
iex> l1 =['test'] | |
['test'] | |
iex> l2 = ['test'] | |
['test'] | |
iex> l1 == l2 | |
true | |
iex> l3 = ["test"] | |
["test"] | |
iex> l1 == l3 | |
false | |
iex> s1 = 'test' | |
'test' | |
iex> s2 = 'test' | |
'test' | |
iex> s3 = "test" | |
"test" | |
iex> s1 == s2 | |
true | |
iex> s1 == s3 | |
false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment