Thun/docs/reference/VERTICAL-LINE•VERTICAL-LINE.md

33 lines
633 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

------------------------------------------------------------------------
## \|\|
Combinator
Short-circuiting Boolean OR
### Definition
> [nulco](#nulco) \[[nullary](#nullary)\] [dip](#dip) \[true\] [branch](#branch)
### Discussion
Accept two quoted programs, run the first and expect a Boolean value, if
its `false` pop it and run the second program (which should also return a
Boolean value) otherwise pop the second program (leaving `true` on the
stack.)
[A] [B] ||
---------------- A -> false
B
[A] [B] ||
---------------- A -> true
true
### Crosslinks
[&&](#section-1)