ok
and i suppose it is the standard, i have been confused by other schemes or racket where my code worked:
CHICKEN
(c) 2008-2019, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.1.0 (rev 8e62f718)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
#;1> 3
3
#;2> (define str2 "hello")
#;3> (string-set! str2 4 #\a)
#;4> str2
"hella"
but not with Racket and #lang R5RS:
Bienvenue dans DrRacket, version 7.7 [3m].
Langage: R5RS; limite mémoire : 128 MB.
> (define str2 "hello")
> (string-set! str2 4 #\a)
. . string-set!: contract violation
expected: (and/c string? (not/c immutable?))
given: "hello"
argument position: 1st
other arguments...:
> string-copy
#<procedure:string-copy>
not in Gauche scheme too...
and as i making string supported by my Scheme+ i had doubt about it also :-) but it works well :
scheme@(guile-user)> (use-modules (Scheme+))
scheme@(guile-user)> {str <+ (string-copy "hello")}
"hello"
scheme@(guile-user)> {str[4]}
#\o
scheme@(guile-user)> {str[4] <- #\a}
#\a
scheme@(guile-user)> str
"hella"
thanks
Damien