This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Life do | |
def start do | |
spawn(fn -> listen() end) | |
end | |
defp listen() do | |
receive do | |
{:add, url} -> | |
loop(url) | |
end |