[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5 Symbols

Builtin Class: <symbol>

A class for symbols.

Reader Syntax: |name|

Denotes a symbol that has weird name, i.e. the name including the characters which is not allowed in the R5RS symbol syntax. If the interpreter is running in case-insensitive mode, this syntax can be used to include uppercase characters in a symbol (See section Case-sensitivity).

The syntax is taken from CommonLisp. Some other Scheme implementation use it as well.

Function: symbol? obj

[R5RS] Returns true if and only if obj is a symbol.

 
(symbol? 'abc)     ⇒ #t
(symbol? 0)        ⇒ #f
(symbol? 'i)       ⇒ #t
(symbol? '-i)      ⇒ #f
(symbol? '|-i|)    ⇒ #t
Function: symbol->string symbol

[R5RS] Returns the name of symbol in a string. Returned string is immutable.

 
(symbol->string 'foo) ⇒ foo
Function: string->symbol string

[R5RS] Returns a symbol whose name is a string string. String may contain weird characters.

 
(string->symbol "a") ⇒ a
(string->symbol "A") ⇒ A
(string->symbol "weird symbol name") ⇒ |weird symbol name|
Function: gensym &optional prefix

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.