Im tackling the dining philosophers algorithm. I need to spawn 5 philosophers which I have done so using this code
main() ->
philos1 = spawn (?MODULE, philosopher, []),
philos2 = spawn (?MODULE, philosopher, []),
philos3 = spawn (?MODULE, philosopher, []),
philos4 = spawn (?MODULE, philosopher, []),
philos5 = spawn (?MODULE, philosopher, []),
fork1 = spawn (?MODULE, fork, []),
fork2 = spawn (?MODULE, fork, []),
fork3 = spawn (?MODULE, fork, []),
fork4 = spawn (?MODULE, fork, []),
fork5 = spawn (?MODULE, fork, []).
Could someone give me a rough idea of what the philosopher and fork functions would look like?