In this guide, we will discuss Erlang tuple_to_list. This method is convert a tuple to a list.
Syntax
tuple_to_list(list)
Parameters
- Tuple − This is the tuple which needs to be converted to a list.
Return Value
Returns a list based on the tuple provided.
For example
-module(helloworld). -export([start/0]). start() -> io:fwrite("~w",[tuple_to_list({1,2,3})]).
Output
The output of the above program is as follows
[1,2,3]
Next Topic : Click Here
Pingback: Erlang - list_to_tuple | Adglob Infosystem Pvt Ltd
Pingback: Erlang - Tuples | Adglob Infosystem Pvt Ltd