From 926924982d4450061a59d1b637537cbe749425ae Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 18 Nov 2013 01:29:54 +0900 Subject: [PATCH] add missing vector functions --- README.md | 2 +- piclib/built-in.scm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c35dade..e48acb46 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ | 6.5 Symbols | yes | | | 6.6 Characters | yes | | | 6.7 Strings | yes | `substring` is not provided | -| 6.8 Vectors | incomplete | string->vector, vector->string, ...etc | +| 6.8 Vectors | yes | | | 6.9 Bytevectors | incomplete | TODO: string<->utf8 conversion, etc | | 6.10 Control features | incomplete | TODO: `string-map`, `vector-map`, ...etc | | 6.11 Exceptions | yes | TODO: native error handling | diff --git a/piclib/built-in.scm b/piclib/built-in.scm index d92edf88..cb60bc09 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -503,6 +503,12 @@ #f) (vector-set! v i fill)))) +(define (vector->string . args) + (list->string (apply vector->list args))) + +(define (string->vector . args) + (list->vector (apply string->list args))) + ;;; 6.9 bytevector (define (bytevector . objs)