Erlang - atom_to_list


Advertisements

This method is used to convert an atom to a list.

Syntax

Atom_to_list(atom)

Parameters

  • atom − This is the atom which needs to be converted to a list value.

Return Value

list value based on the input of the atom.

For example

-module(helloworld). 
-export([start/0]). 

start() ->   
   io:fwrite("~p~n",[atom_to_list(atom1)]).

Output

The output of the above program is as follows.

“atom1”
erlang_atoms.htm
Advertisements