Skip to content

Instantly share code, notes, and snippets.

@nox
Created November 24, 2012 13:24
Show Gist options
  • Save nox/4139688 to your computer and use it in GitHub Desktop.
Save nox/4139688 to your computer and use it in GitHub Desktop.
erlang:list_to_atom/2
erlang:list_to_atom(string(), [global | safe]).
string | options | result
---------------+--------------------------+---------------------------
"not_existing" | global | not_existing (global)
"existing" | global | existing (global)
"not_existing" | safe | not_existing (local)
"existing" | safe | existing (global)
"not_existing" | global, safe | FAILURE
"existing" | global, safe | existing (global)
erlang:list_to_atom(List) -> erlang:list_to_atom(List, [safe]).
erlang:list_to_existing_atom(List) -> erlang:list_to_atom(List, [global, safe]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment