mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
Allow string-map to accept multiple lists
This commit is contained in:
parent
0f8f6c2efe
commit
7aa7a8fefb
1 changed files with 3 additions and 2 deletions
|
@ -735,8 +735,9 @@
|
|||
(string-set! str i fill)
|
||||
(loop (+ i 1)))))))
|
||||
(loop start)))
|
||||
(define (string-map func str)
|
||||
(list->string (map func (string->list str))))
|
||||
(define (string-map func str1 . strs)
|
||||
(list->string
|
||||
(apply map `(,func ,(string->list str1) ,@(map string->list strs)))))
|
||||
(define (string-for-each func str)
|
||||
(for-each func (string->list str)))
|
||||
(define (vector-map func vec)
|
||||
|
|
Loading…
Add table
Reference in a new issue