I thought it odd that:

guile> (string-length "")
0
guile> (string-ref "" 3)
#\nul

but:

guile> (string-set! "" 123 #\a)
guile> (string-ref "" 123)
#\a
guile> (substring "" 123 124)

Backtrace:
In standard input:
   6: 0* [substring "" {123} 124]

standard input:6:1: In procedure substring in expression (substring "" 123 ...):
standard input:6:1: Value out of range 0 to 0: 123
ABORT: (out-of-range)




Reply via email to