toggle ( variable -- ) (original) (raw)

toggle ( variable -- )
Factor handbook » The language » Dynamic variables » Changing variable values

Prev: change-global ( variable quot -- )

Vocabulary
namespaces

Inputs

variable a variable, by convention a symbol

Outputs
None

Word description
Changes the boolean value of a variable to its opposite.

Definition

USING: kernel ;

IN: namespaces

: toggle ( variable -- ) [ not ] change ; inline