Rebol Programming/alter

= USAGE: = ALTER series value /case

= DESCRIPTION: = If a value is not found in a series, append it; otherwise, remove it. Returns true if added. (Modifies)

ALTER is a function value. = ARGUMENTS =
 * series -- (Type: series port)
 * value -- (Type: any)

= REFINEMENTS =
 * /case -- Case-sensitive comparison

= SOURCE CODE = alter: 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] ]