Soluzione non commentata.

-module(cellObj)
-export(createCO/1, loopCO/1)


createCO() -> spawn(cellObj,loopCO,[0]).


loopCO(N) -> receive
             {read,PID}     -> PID!N, loopCO(N); 
             {write,M}      -> loopCO(M);
             {eq,PIDobj,PID}-> PIDobj!{read,self()},
                               PID!(receive
                                       Contents -> (N==Contents)
                                    end),  
                               loopCO(N)
             end.   

