Package jason.stdlib

Class atom

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".atom(arg)", hint="checks whether the argument is an atom (a structure with arity 0)", argsHint="the term to be checked", argsType="term", examples={".atom(b(10)): false",".atom(b): true",".atom(~b): false",".atom(10): false",".atom(\"home page\"): false",".atom(X): only true if X is bound to an atom",".atom(a(X)): false",".atom(a[X]): false",".atom([a,b,c]): false",".atom([a,b,c(X)]): false"}, seeAlso={"jason.stdlib.atom","jason.stdlib.list","jason.stdlib.literal","jason.stdlib.number","jason.stdlib.string","jason.stdlib.structure","jason.stdlib.ground"}) public class atom extends DefaultInternalAction

Internal action: .atom.

Description: checks whether the argument is an atom (a structure with arity 0), for example "p". Numbers, strings, and free variables are not atoms.

Parameters:

  • + arg (any term): the term to be checked.

Examples:

  • .atom(b(10)): false.
  • .atom(b): true.
  • .atom(~b): false.
  • .atom(10): false.
  • .atom("home page"): false.
  • .atom(X): only true if X is bound to an atom.
  • .atom(a(X)): false.
  • .atom(a[X]): false.
  • .atom([a,b,c]): false.
  • .atom([a,b,c(X)]): false.
See Also: