You've gotten some other good answers, but, just in case:

   (+:@]^:[&1)3
8

Thanks,

-- 
Raul
On Tue, Aug 7, 2018 at 6:56 AM Martin Kreuzer <[email protected]> wrote:
>
> Hi all -
>
> Have been playing with the Power conjunction using this (not uncommon) example
>
>     po2=. 3 : '+:^:y 1'   NB. power of two by repeated doubling
>     po2 5
> 32
>
> Then I have wanted to come up with a tacit version of *po2 (a monad
> with no of repetions as only argument) and tried
>
>     (+:^:])5   NB. does the doubling alright but  ...
> 160
>
> and a number of variations of this
>
>     (+:^:] 1)5
> |syntax error
> |       (+:^:]1)5
>
> Q: Where should I put the start value of 1..?
>
> Thanks
> -M
>
> ----------------------------------------------------------------------
> 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