Closed minghu6 closed 4 years ago
Some times, maybe more frequently, you really need get the tail element of the queue. Though, I can write my own version as a workaround:
queue
(defun back (serapeum-queue) (alexandria:last-elt (qlist serapeum-queue)))
Supply a back method for queue from serapeum is the better way. since there is already a front method:
back
serapeum
front
https://github.com/ruricolist/serapeum/blob/408abccd519254efe877d49aeb4c2b912bd0ffc0/queue.lisp#L146
That's a good idea and it can be done in constant time (without traversing the list).
En.., So, add enhancement label for this issue?
Some times, maybe more frequently, you really need get the tail element of the
queue
. Though, I can write my own version as a workaround:Supply a
back
method for queue fromserapeum
is the better way. since there is already afront
method:https://github.com/ruricolist/serapeum/blob/408abccd519254efe877d49aeb4c2b912bd0ffc0/queue.lisp#L146