Thanks, that's all good stuff but what I found was on the lines of

if =: 3 : ….    an actual verb definition.

Regards, Rob.

> On 13 Apr 2022, at 14:06, Jan-Pieter Jacobs <janpieter.jac...@gmail.com> 
> wrote:
> 
> I think your looking for power (^:), a conjunction though.
> 
>   +: ^: (2&|)"0 i. 8
> 0 2 2 6 4 10 6 14
> 
> which one could read as: double (+:) if (^:) odd (2&|) for each atom ("0)
> in the input (i. 8).
> 
> Note that ^: is more general than "if": in u ^: v y, u is applied (v y)
> times. in the case of odd (2&|) it happens to be either 0 or 1 time.
> 
> See https://code.jsoftware.com/wiki/Vocabulary/hatco for more info.
> 
> Hope this helps!
> 
> Jan-Pieter
> 
>> On Wed, 13 Apr 2022, 14:52 'Rob B' via Programming, <
>> programm...@jsoftware.com> wrote:
>> 
>> Hi,
>> 
>> While looking through the help info I found a reference to an 'if utility'
>> which allows 'if' to be  defined as a verb and so be used outside a verb.
>> 
>> I cannot find it again, could someone point me to it please?
>> 
>> Thanks, Rob.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to