Symbol Type

Symbols are usually what you think of in other languages as identifiers, the references to values. In Idio they can also be used first class values in their own right, often as flags.

If a symbol is bound to a value, ie. it is being used as an identifier, then the evaluator will evaluate the symbol to the value. To prevent the evaluator performing that function you need to quote the symbol.

function symbol? o

test if o is a symbol

Param o:

object to test

Return:

#t if o is a symbol, #f otherwise

function gensym [prefix]

generate a new unique symbol using prefix followed by /

Such gensyms are not guaranteed to be unique if saved.

Param prefix:

prefix string, defaults to "g"

Type prefix:

string or symbol, optional

Return:

unique symbol

Rtype:

symbol

function gensym? o

test if o is a gensym

Param o:

object to test

Return:

#t if o is a gensym, #f otherwise

function string->symbol s

return a symbol derived from s

Param s:

string

Type s:

string

Return:

symbol

Rtype:

symbol

function symbols

return all known symbols

Return:

all known symbols

Rtype:

list

Last built at 2024-12-21T07:10:46Z+0000 from 62cca4c (dev) for Idio 0.3.b.6