# Compute left neighbor of philosopher i.

resource main()
  op left(int) returns int

  proc left(i) returns lft  {
    lft = (i-2) mod 5 + 1
  }

  int phil = 1
  int  neighbor 
  while (phil <= 5) {
    neighbor = left(phil)
    write(neighbor," is left of ",phil)
    phil++
  }

end

