FDLYIPCIOJRMY6ZWYKR25I25OAOSSAORLOGZYHLLOQHVOPGTKKYAC
FCLBO6RXX5SKKF2TSQKUPG32B2KR6UBCAREDSOMQ4VDUPU6YGAUAC
E7W7SX63DUAHITV3QD4P5PTZPFSASNZTBRNJZI4KIY6XHWRSA5WAC
SCSKOWMTCSTVJUZ4KPYFFCRDFGDPZWQUNQ5X5MQQ7USMBM57CGHAC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
Z63GNDZMADT3EZ2AXMRJACMLUJDUNN32IO7DXF4WGGYLBWPZ6FHAC
NT6HQMTF6MZKEW5JAW6BAZXPQAYNZLSRWPCZ7SKRDKSOVL2UP52QC
G5QWNM5KIWQPIT4MGOC5SBUWEIIVZS67YPIH3U5TUASHASABE2CQC
XKBAYE546KBYGPXQFVIVWLVAOR6GSJALEGRLWFSHA5LRUFKJCDTQC
V4U4N77ULT5CQG2AISTFD3B4K73QTWWYXKZ27SXFCBXXYXLM7DBQC
}
pub fn (mut self Queue) set(id string, msg Say) {
self.entries[id] = msg
}
pub fn (mut self Queue) get(id string) Say {
return self.entries[id]
}
pub fn (mut self Queue) len() int {
return self.entries.len
}
pub fn (mut self Queue) delete(id string) {
self.entries.delete(id)
}
pub fn (mut self Queue) next() ?Say {
id := self.next_id() ?
return self.entries[id]
}
pub fn (mut self Queue) next_id() ?string {
if self.entries.len > 0 {
return self.entries.keys()[0]
} else {
return error('empty')
}