Ping and Pong Processes

hey, i wanna write a program that spawns two process. The first process, on receivng a ping message, should reply to the sender with pong message. The second process, on receiving a pong message should reply with a ping message.
i know this is simple but i am new to elixir, i learned some basic and currently i am following The little elixir and otp guide book.
i tried but failed, it would be great if you help me…

Hey there, welcome to elixir :slightly_smiling_face:!

Your idea does sound like a good start into learning how processes work: Like you said - it’s simple, but will teach you some important basics.

But for us to actually help you out with your solution and not just write down one of our own, can you share what you currently have tried and why you think it’s not working the way you want it to?


finally i made it, it was very simple to do

Glad you got it working on your own, well done :+1:

1 Like