From 38c118ea2d95e68a6854579a281eb8af19064902 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 26 Apr 2016 22:27:26 +0200 Subject: Add preliminary support for Chez Scheme --- scheme/chez/geiser/geiser.ss | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 scheme/chez/geiser/geiser.ss (limited to 'scheme/chez') diff --git a/scheme/chez/geiser/geiser.ss b/scheme/chez/geiser/geiser.ss new file mode 100644 index 0000000..3dbed7f --- /dev/null +++ b/scheme/chez/geiser/geiser.ss @@ -0,0 +1,62 @@ +(library (geiser) + (export geiser:eval + geiser:completions + geiser:module-completions + geiser:autodoc + geiser:no-values + geiser:newline) + (import (chezscheme)) + + (define string-prefix? + (lambda (x y) + (let ([n (string-length x)]) + (and (fx<= n (string-length y)) + (let prefix? ([i 0]) + (or (fx= i n) + (and (char=? (string-ref x i) (string-ref y i)) + (prefix? (fx+ i 1))))))))) + + (define (geiser:completions prefix . rest) + rest + (sort string-ci