On this page:
8.18
top
up

1identifier moduleπŸ”— i

procedure

( identifier->symbol id)symbol?

Convert an identifier to a symbol.

Examples:
> (identifier->symbol #'revise)

'revise

> (identifier->symbol #'arc+)

'arc+

> (identifier->symbol #'| - |)

'| - |

procedure

( symbol->identifier sym[srcloc])identifier?

sym:symbol?
srcloc:(or/c#fsyntax? srcloc? )=#f
Convert a symbol to an identifier.

Example:

#<syntax abc>

When srcloc is provided, the srcloc of the result will follow the given.

Examples:
> (define srcloc#'id)
> (symbol->identifier 'abcsrcloc)

#<syntax:eval:5:0 abc>

procedure

( identifier->string id)string?

Convert an identifier to a string.

Examples:

"abc"

> (identifier->string #'+-*/@~*&%$)

"+-*/@~*&%$"

""

> (identifier->string #'| - |)

" - "

procedure

( string->identifier str[srcloc])identifier?

str:string?
srcloc:(or/c#fsyntax? srcloc? )=#f
Convert a string to an identifier.

Example:

#<syntax abc>

When srcloc is provided, the srcloc of the result will follow the given.

Examples:
> (define srcloc#'id)
> (string->identifier "abc"srcloc)

#<syntax:eval:12:0 abc>

procedure

( identifier-append ids...[#:srclocsrcloc])identifier?

srcloc:(or/c#fsyntax? srcloc? )=#f
Concat multiple identifier into one.

Examples:
> (identifier-append #'ab#'c)

#<syntax abc>

> (identifier-append #'hello#'- #'world)

#<syntax hello-world>

When srcloc is provided, the srcloc of the result will follow the given.

Examples:
> (define srcloc#'id)
> (identifier-append #'hello#'-world
#:srclocsrcloc)

#<syntax:eval:16:0 hello-world>

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /