diff options
author | Yale AI Dept <ai@nebula.cs.yale.edu> | 1993-07-14 13:08:00 -0500 |
---|---|---|
committer | Duncan McGreggor <duncan.mcgreggor@rackspace.com> | 1993-07-14 13:08:00 -0500 |
commit | 4e987026148fe65c323afbc93cd560c07bf06b3f (patch) | |
tree | 26ae54177389edcbe453d25a00c38c2774e8b7d4 /top/has-utils.scm |
Import to github.
Diffstat (limited to 'top/has-utils.scm')
-rw-r--r-- | top/has-utils.scm | 21 |
1 files changed, 21 insertions, 0 deletions
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))) + + |