Minor simplification
Evan Huus
9 years ago
65 | 65 |
if i >= q.Length() || i < 0 {
|
66 | 66 |
panic("queue: index out of range")
|
67 | 67 |
}
|
68 | |
modi := (q.head + i) % len(q.buf)
|
69 | |
return q.buf[modi]
|
|
68 |
return q.buf[(q.head+i)%len(q.buf)]
|
70 | 69 |
}
|
71 | 70 |
|
72 | 71 |
// Remove removes the element from the front of the queue. If you actually
|