Last active
August 29, 2015 14:11
-
-
Save plukevdh/df39a83b731782a50191 to your computer and use it in GitHub Desktop.
lists, how do they work
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
iex(8)> list = [:width, 1024, :height, 768, :content_type, "image/png", :postProcess, true] | |
[:width, 1024, :height, 768, :content_type, "image/png", :postProcess, true] | |
iex(9)> is_list list | |
true | |
iex(10)> :erlang.list_to_binary list | |
** (ArgumentError) argument error | |
:erlang.list_to_binary([:width, 1024, :height, 768, :content_type, "image/png", :postProcess, true]) | |
iex(11)> List.Chars.to_char_list(list) |> :erlang.list_to_binary | |
** (ArgumentError) argument error | |
:erlang.list_to_binary([:width, 1024, :height, 768, :content_type, "image/png", :postProcess, true]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment