From 77583a881b03ce38c8065c40641489fe88b61eb2 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 9 Jan 2022 22:55:59 -0800 Subject: Write the linker. --- strings.csc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'strings.csc') diff --git a/strings.csc b/strings.csc index 0828363..737c91b 100644 --- a/strings.csc +++ b/strings.csc @@ -1,12 +1,14 @@ (define-library (csc strings) (export find + join not-found-error? prefix? str-quote) (import (scheme base) - (scheme case-lambda) - (only (scheme write) write)) + (only (scheme case-lambda) case-lambda) + (only (scheme write) write) + (only (csc list) intercalate)) (begin @@ -37,4 +39,8 @@ (let loop ((i start)) (cond ((>= i end) (raise (make-not-found-error))) ((prefix? match str i) i) - (else (loop (+ 1 i)))))))))) + (else (loop (+ 1 i)))))))) + + + (define (join sep . strings) + (apply string-append (intercalate sep strings))))) -- cgit v1.3.1