🔍
Polyadic | (or condition)
Polyadic short-circuit "or" 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; 0b; 0b; 1; 2]
1
o)f:{|[(!`v`long)=@x; (!``table)=@x; x y; "error"]}
{|[(!`v`long)=@x; (!``table)=@x; x y; "error"]}
o)f[1 2 3; 1]
2
o)f[+`a!1 2 3; 1]
a| 2
o)f["123"; 1]
"error"