6
edits
(→Documentation: BQN) |
(fixed arguments of function Y argument) |
||
Line 8: | Line 8: | ||
Power repeatedly applies <source lang=apl inline>f</source> to <source lang=apl inline>Y</source> based on the type of operand <source lang=apl inline>g</source>: | Power repeatedly applies <source lang=apl inline>f</source> to <source lang=apl inline>Y</source> based on the type of operand <source lang=apl inline>g</source>: | ||
* '''Function''': Must be dyadic and must return a boolean [[singleton]]. The previous iteration value is provided as | * '''Function''': Must be dyadic and must return a boolean [[singleton]]. The previous iteration value is provided as the right argument to <source lang=apl inline>f</source>, and the current iteration value is given as the left argument. <source lang=apl inline>f</source> is repeatedly applied until this function returns 1. | ||
* '''Integer''': Applies <source lang=apl inline>f</source> <source lang=apl inline>g</source> times to <source lang=apl inline>Y</source>. If <source lang=apl inline>g</source> is negative, then the inverse of <source lang=apl inline>f</source> (if available) is applied. | * '''Integer''': Applies <source lang=apl inline>f</source> <source lang=apl inline>g</source> times to <source lang=apl inline>Y</source>. If <source lang=apl inline>g</source> is negative, then the inverse of <source lang=apl inline>f</source> (if available) is applied. | ||
* '''Integer Array''': In [[Extended Dyalog APL]], <source lang=apl inline>g</source> can be an integer array. Each integer <source lang=apl inline>i</source> in <source lang=apl inline>g</source> will be replaced by <source lang=apl inline>⊂(f⍣i)Y</source>. | * '''Integer Array''': In [[Extended Dyalog APL]], <source lang=apl inline>g</source> can be an integer array. Each integer <source lang=apl inline>i</source> in <source lang=apl inline>g</source> will be replaced by <source lang=apl inline>⊂(f⍣i)Y</source>. |
edits