Queue/Definition: Difference between revisions
m
→{{header|Wart}}
(→{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details) |
|||
Line 4,156:
=={{header|Wart}}==
Wart defines queues as lists with a pointer to the last element saved for constant-time enqueuing:
<lang python>def (queue seq)
(tag queue (list seq lastcons.seq len.seq))
Line 4,179:
<code>empty?</code> relies on <code>len</code> by default, so there's no need to separately override it.
=={{header|XLISP}}==
|