mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 15:34:10 +03:00
56 lines
761 B
Markdown
56 lines
761 B
Markdown
|
[wutbar, `?|`, %wtbr](#wtbr)
|
||
|
============================
|
||
|
|
||
|
OR
|
||
|
|
||
|
`?|` is a synthetic hoon that computes the "or" of the loobeans in `p`.
|
||
|
`?|` is commonly used as a control-flow mechanism.
|
||
|
|
||
|
Produces
|
||
|
--------
|
||
|
|
||
|
Twig: `[%wtbr p=tusk]`
|
||
|
|
||
|
Sample
|
||
|
------
|
||
|
|
||
|
`p` is a [`++tusk`](), a list of [twig]()s.
|
||
|
|
||
|
Tall form
|
||
|
---------
|
||
|
|
||
|
?| i.p
|
||
|
i.t.p
|
||
|
i.t.t.p
|
||
|
==
|
||
|
|
||
|
Wide form
|
||
|
---------
|
||
|
|
||
|
?|(i.p i.t.p i.t.t.p)
|
||
|
|
||
|
Irregular form
|
||
|
--------------
|
||
|
|
||
|
|(i.p i.t.p i.t.t.p)
|
||
|
|
||
|
Examples
|
||
|
--------
|
||
|
|
||
|
~zod/try=> ?|(& |)
|
||
|
%.y
|
||
|
~zod/try=> |(& |)
|
||
|
%.y
|
||
|
~zod/try=> |(| |)
|
||
|
%.n
|
||
|
~zod/try=> (gth 2 1)
|
||
|
%.y
|
||
|
~zod/try=> |((gth 2 1) |)
|
||
|
%.y
|
||
|
~zod/try=> |((gth 1 2) |)
|
||
|
%.n
|
||
|
~zod/try=> |((gth 2 1) &)
|
||
|
%.y
|
||
|
~zod/try=> |((gth 1 2) &)
|
||
|
%.y
|