Rebol Programming/alter
USAGE:
editALTER series value /case
DESCRIPTION:
editIf a value is not found in a series, append it; otherwise, remove it. Returns true if added. (Modifies)
ALTER is a function value.
ARGUMENTS
edit- series -- (Type: series port)
- value -- (Type: any)
REFINEMENTS
edit- /case -- Case-sensitive comparison
SOURCE CODE
editalter: func [ {If a value is not found in a series, append it; otherwise, remove it. Returns true if added. (Modifies)} series [series! port!] value /case "Case-sensitive comparison" ][ found? unless remove ( either case [find/case series :value] [find series :value] ) [append series :value] ]