.. include:: ../../global.rst .. _`symbol type`: Symbol Type =========== Symbols are usually what you think of in other languages as identifiers, the references to values. In :lname:`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 :ref:`quote ` the symbol. .. _`symbol?`: .. idio:function:: symbol? o test if `o` is a symbol :param o: object to test :return: ``#t`` if `o` is a symbol, ``#f`` otherwise .. _`gensym`: .. idio: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 .. _`gensym?`: .. idio:function:: gensym? o test if `o` is a gensym :param o: object to test :return: ``#t`` if `o` is a gensym, ``#f`` otherwise .. _`string->symbol`: .. idio:function:: string->symbol s return a symbol derived from `s` :param s: string :type s: string :return: symbol :rtype: symbol .. _`symbols`: .. idio:function:: symbols return all known symbols :return: all known symbols :rtype: list .. include:: ../../commit.rst