Piped Value (Expression) — skLambda

Addon: skLambda · Category: Expression · Since: 1.2.0

Syntax

pipe %object% through %objects%

Description

Threads a value left-to-right through a chain of one-argument lambdas, feeding each lambda's result into the next. `pipe x through a, b, c` is `call c with (call b with (call a with x))`. Each lambda is called with the running value as its single argument. A list entry that isn't a lambda is skipped, leaving the value unchanged.

Examples

# {_trim}, {_lowercase}, {_capitalize} are single-argument lambdas
set {_name} to pipe " STEVE " through {_trim}, {_lowercase}, and {_capitalize}
# "Steve"

View source