Erlang Language iolists IO list can be converted to a binary


Example

<<"Guten tag, Hello">> = iolist_to_binary(["Guten tag, ",<<"Hello">>]).

An IO list can be converted to a binary using the iolist_to_binary/1 function. If the data is going to be stored for a long period or sent as a message to other processes then it may make sense to convert it to a binary. The one off cost of converting to a binary can be cheaper than copying the IO list many times, in garbage collection of a single process or in message passing to others.