Negated Lambda (Expression) — skLambda

Addon: skLambda · Category: Expression · Since: 1.1.0

Syntax

negated %object%

Description

Inverts a predicate lambda: the result passes exactly when the original does not. Handy with `passes` and the `filtered where` / `count of ... where` list ops, and as the complement of `always()` / `never()`. The negated lambda keeps the original's parameters and returns a boolean. A lambda that isn't a predicate (null/non-boolean result) counts as not passing, so its negation passes.

Examples

set {_is-op} to lambda (p: player): {_p} is op
set {_not-op} to negated {_is-op}
set {_visitors::*} to all players filtered where {_not-op} passes

View source