mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Additional documentation for symbol manipulation functions.
* doc/ref/api-data.texi (Symbol Primitives): Document `symbol', `list->symbol', and `symbol-append'.
This commit is contained in:
parent
a2c36371ce
commit
c5fc8f8c56
1 changed files with 31 additions and 1 deletions
|
@ -4864,7 +4864,37 @@ strings returned by this procedure.
|
||||||
|
|
||||||
Most symbols are created by writing them literally in code. However it
|
Most symbols are created by writing them literally in code. However it
|
||||||
is also possible to create symbols programmatically using the following
|
is also possible to create symbols programmatically using the following
|
||||||
@code{string->symbol} and @code{string-ci->symbol} procedures:
|
procedures:
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} symbol char@dots{}
|
||||||
|
@rnindex symbol
|
||||||
|
Return a newly allocated symbol made from the given character arguments.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(symbol #\x #\y #\z) @result{} xyz
|
||||||
|
@end example
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} list->symbol lst
|
||||||
|
@rnindex list->symbol
|
||||||
|
Return a newly allocated symbol made from a list of characters.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(list->symbol '(#\a #\b #\c)) @result{} abc
|
||||||
|
@end example
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@rnindex symbol-append
|
||||||
|
@deffn {Scheme Procedure} symbol-append . args
|
||||||
|
Return a newly allocated symbol whose characters form the
|
||||||
|
concatenation of the given symbols, @var{args}.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(let ((h 'hello))
|
||||||
|
(symbol-append h 'world))
|
||||||
|
@result{} helloworld
|
||||||
|
@end example
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@rnindex string->symbol
|
@rnindex string->symbol
|
||||||
@deffn {Scheme Procedure} string->symbol string
|
@deffn {Scheme Procedure} string->symbol string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue