An atom is:
'Whatever you like'
).
this_IS_an_atom
).
+
, -
,
*
, /
, \
, ^
, >
, <
, =
,
'
, :
, .
, ?
, @
, #
, $
,
&
. (e.g. ***+***+@
).
[]
, {}
, ;
, !
.
The Prolog built-in predicate atom/1
will tell you if a given term is
or isn't an atom. It gives the following behaviour:
| ?- atom(foo). yes | ?- atom(Foo). no | ?- atom('Foo'). yes | ?- atom([]). yes