How to implement System verilog Mailbox's Peek behavior using System Verilog Queue?

In reply to Hardik Trivedi:

int que[$]; //queue declaration
...
function int peek();
    while (que.size > 0) begin
        peek = que[0];
    end
endtask