From 4e987026148fe65c323afbc93cd560c07bf06b3f Mon Sep 17 00:00:00 2001 From: Yale AI Dept Date: Wed, 14 Jul 1993 13:08:00 -0500 Subject: Import to github. --- top/has-utils.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 top/has-utils.scm (limited to 'top/has-utils.scm') diff --git a/top/has-utils.scm b/top/has-utils.scm new file mode 100644 index 0000000..62a0c3f --- /dev/null +++ b/top/has-utils.scm @@ -0,0 +1,21 @@ +;;; These utilities are specific to the Haskell language. + +(define (add-con-prefix str) ; should be in some utility file + (string-append ";" str)) + +(define (remove-con-prefix string) + (substring string 1 (string-length string))) + +(define (has-con-prefix? string) + (char=? (string-ref string 0) '#\;)) + +(define (add-con-prefix/symbol sym) + (string->symbol (add-con-prefix (symbol->string sym)))) + +(define (remove-con-prefix/symbol sym) + (string->symbol (remove-con-prefix (symbol->string sym)))) + +(define (has-con-prefix/symbol? sym) + (has-con-prefix? (symbol->string sym))) + + -- cgit v1.2.3