[racket] Compound mutable list manipulation - 2 qs
On 2012-02-13 09:38:05 -0500, Matthias Felleisen wrote:
> As Marjin points out, you are not using a list per se but you are implementing a queue data structure with cons cells. And he also correctly reminds readers of the list that there are functional approaches to queue implementation that (in the measured reality of microbenchmarks) come close to imperative versions. For sample code, see galore and especially pfds on http://planet.racket-lang.org/ . There are also queue implementations on planet, though read on:
BTW, pfds is now being maintained on github as well:
https://github.com/takikawa/tr-pfds
Currently it's functionally the same (modulo some re-organization), but
the plan is to improve code & docs as needed. Credit goes to Hari for
the original work.
Cheers,
Asumu