🔍

Polyadic & (and condition)

Polyadic short-circuit "and" condition. Trіadic form behaves exactly as $[<cond>; <true res>; <false res>] verb.

Syntax: &[<cond1>〔; <cond2>〔; .. 〕〕; <true res>; <false res>]

o)&[1b; 1b; 1; 2]
1
o)&[1b; 0b; 1b; 1b; 1; 2]
2
o)x:1 2 3
1 2 3
o)i:"s"
"s"
o)&[(!`v`long)=@x; (!`s`long)=@i; x+i; "error"]
"error"

$