|
From: | Arne Babenhauserheide |
Subject: | An implementation of srfi-134 for Guile |
Date: | Fri, 15 May 2020 00:03:13 +0200 |
User-agent: | mu4e 1.4.4; emacs 26.3 |
Hi John, Hi Arthur, I wrote an implementation of SRFI-134 for Guile. Attached are the files both in SRFI-119 (wisp) syntax and in regular s-expressions, as well as the same for the doctests module I use (it’s one I wrote myself that enables me to have tests right in the procedure-definitions) and the license files (gpl+lgpl, since LGPL references GPL). The motivation was that I needed good FIFO queues for a project for students; and then I kept going to add the whole SRFI-134 API• To run the tests, use chmod +x deque.scm ./deque.scm --test If it does not work, please tell me! To run the wisp versions, you’ll need wisp installed. See https://www.draketo.de/english/wisp Or you can run them from the guarded-commands repository which directly includes a copy of the wisp language definition, so running wisp files grabs the local wisp version of this repository: https://hg.sr.ht/~arnebab/guarded-commands Almost all procedures have tests attached. You can recognize them by this pattern: (define (ideque-remove-front ideq) "Returns an ideque with the front element of ideque removed. It is an error for ideque to be empty. Takes O(1) time." #((tests (test-equal (ideque '()) (ideque-remove-front (make-ideque '(1) '()))))) …) Forms like (test-equal …) are run as tests via srfi-64. Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken
deque.scm
Description: Binary data
doctests.scm
Description: Binary data
deque.w
Description: Binary data
doctests.w
Description: Binary data
COPYING.gpl
Description: Binary data
COPYING.lgpl
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |