immutable deques implementation using fingertrees Amirouche Boubekki 04 Jul 2020 10:05 UTC

Is there an existing implementation of SRFI-134 using fingertrees?

Otherwise, I can try to build one.

There is an open-source fingertrees library [0] that I used to
implement buffers through indexable lists [1]

The constructor I rely on is the following:

  (define (make-index-list lst)
    (list->fingertree lst 0 + (lambda (x) 1)))

Where list->fingertree signature is:

  (list->fingertree lst id append convert)

Is there a better way to express ideques in terms of fingertrees?

Thanks in advance!

[0] https://github.com/ijp/pfds/blob/master/fingertrees.sls
[1] https://github.com/amirouche/zk/blob/master/zk/buffer.scm