diff --git a/tinyqueue.go b/tinyqueue.go index 4cc2bb4..4a06258 100644 --- a/tinyqueue.go +++ b/tinyqueue.go @@ -46,7 +46,9 @@ func (q *Queue) Peek() Item { } return q.data[0] } - +func (q *Queue) Len() int { + return q.length +} func (q *Queue) down(pos int) { data := q.data halfLength := q.length >> 1