Quick - ÐḶ
- Repeat Until No Longer Unique (Collect Loop)
Arity: same
The resulting link's arity is the same as the consumed link's arity. Note that the arity refers to that of the resulting link, not the number of links this quick consumes.
Functionality
Repeat a link until the result is no longer unique, returning results in the loop.
Details
If the link is dyadic, after the first iteration, the previous result is the left argument and the result before that (the left argument is the initial result) is the right argument. For niladic links, it will return [None, z]
as a result of undefined behavior. For example, to evaluate 1 +%10ɗ ÐḶ 1
, we begin with 1
. The next value is 1 + 1
, then 2 + 1
, then 3 + 2
, then 5 + 3
, then 8 + 5
(which evaluates to 3
because of the % 10
). This result is not unique, so all elements between the repeated element and the final result are collected, and the result is [3, 5, 8]
.
Syntax
<link>ÐḶ
- loop until results are no longer unique