export default class Mailbox {
  constructor() {
    this.inbox = [];
  }

  enqueue(envelope) {
    this.inbox.push(envelope);
  }

  dequeue() {
    return this.inbox.shift();
  }
}

export default class Mailbox {
  constructor() {
    this.inbox = [];
  }

  enqueue(receiver, envelope) {
    this.inbox.push({ receiver, envelope });
  }

  dequeue() {
    return this.inbox.shift();
  }
}

include receiver to mailbox