Skip to content

Instantly share code, notes, and snippets.

@plukevdh
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plukevdh/df39a83b731782a50191 to your computer and use it in GitHub Desktop.
Save plukevdh/df39a83b731782a50191 to your computer and use it in GitHub Desktop.
lists, how do they work
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