Cond
Name
Mandatory
Description
Default
Type
⬅️ Input
The value that will be passed to each predicate and action to execute.
Any
Output ➡️
The input of the shard if Passthrough
is true
; otherwise, the output of the action of the first matching condition.
Any
Wires
Yes
A sequence of shards, interleaving condition test predicate and action to execute if the condition matches.
None
[Shard [Shard] None]
Passthrough
No
The output of this shard will be its input.
true
Bool
Threading
No
Will not short circuit after the first true test expression. The threaded value gets used in only the action and not the test part of the clause.
false
Bool
Takes a sequence of conditions and predicates. Evaluates each condition one by one and if one matches, executes the associated action.
Examples
[5 10 15 20]
ForEach({
Cond([
{IsMore(15)} {Msg("This number is more than 15")}
{IsMore(10)} {Msg("This number is more than 10")}
{IsMore(5)} {Msg("This number is more than 5")}
{IsMore(0)} {Msg("This number is more than 0")}])
})