Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic libs for scheme (queue)

Tags:

scheme

racket

I've used scheme for fun, and now I'd like to try it for something serious. While I see the educational value in implementing the basic data structures from scratch, via car and cdr and recursion, I'd like to find a "batteries included" lib for the basic containers: queue, stack, access nth item, etc, with mutation.

How can I find one?

(I'm using an old PLT Scheme; if need be, I could upgrade to Racket)

like image 713
SRobertJames Avatar asked May 24 '26 19:05

SRobertJames


1 Answers

Take a look at the SRFIs, there you'll find a lot of nice list procedures and data structure implementations (say, queues).

Also, Racket includes several basic data structures (sets, hash tables, etc.) and a rich collection of built-in list procedures, many borrowed from the above mentioned SRFIs, and anyway you can import SRFIs in Racket, for extra power.

Why the requirement of mutation? certainly you'll find mutable data structures / list operations in the SRFIs and in Racket, but that's not the idiomatic way to build programs in Scheme or Racket.

like image 113
Óscar López Avatar answered May 26 '26 15:05

Óscar López



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!