Message passing between processes in erlang?

308 Views Asked by At

How can I send all elements of a list one by one, from the original process to another process through message passing in Erlang?

1

There are 1 best solutions below

4
On

You could use a list comprehension. For example, assume Pid represents the target process, and List is the list whose elements you want to send to Pid:

[Pid ! Element || Element <- List]