[Haskell] Queues / Lists with unbound tails
andrew cooke
andrew at acooke.org
Sat May 8 12:10:39 EDT 2004
Claus Reinke said:
> You can't really pop from a fixed-length queue. Apart from that,
something like this?
Just to clarify, I want something with a *single* operation that takes one
value, adding it to the front of the queue, and returns a tuple containing
the value that was at the end of the queue and a new queue, with the new
value at the front, and without the returned value at the end. See the
QUEUE type in my email.
So when you push at the front, something pops off the end. If that's not
a queue, or not pushing, or not popping then please ignore the words, and
just go with the idea.
Thanks,
Andrew
--
` __ _ __ ___ ___| |_____ work web site: http://www.ctio.noao.edu/~andrew
/ _` / _/ _ \/ _ \ / / -_) personal web site: http://www.acooke.org/andrew
\__,_\__\___/\___/_\_\___| list: http://www.acooke.org/andrew/compute.html
More information about the Haskell
mailing list