>  4 : '(g^:x)y'
>
>
> I wonder why  f  is not translated into tacit code.

Bo, although several alternatives were offered, I did not see an answer to
your tacit question.  You can find the reason by looking at the "Proof of
Completeness" in http://www.jsoftware.com/jwiki/Essays/Trains .
http://www.jsoftware.com/jwiki/Essays/Trains
The short answer is because x is used as an argument to a conjunction.

You might also be interested to see the results of  searching (Google/Bing)
using the query: Collatz site:www.jsoftware.com.  Incidentally, the
sequence A008908, a relative of cn ( cn=. _1 , A008908 @: <: ) can be fixed
in extended J as,

   A008908=. 1:`(1 + $:@:(%&2`(1 + 3&*)@.(2&|)))@.(1&<)"0 M.
(103!:0)@:>:@:I.

   A008908 71
1 2 8 3 6 9 17 4 20 7 15 10 10 18 18 5 13 21 21 8 8 16 16 11 24 11 112 19
19 19 107 6 27 14 14 22 22 22 35 9 110 9 30 17 17 17 105 12 25 25 25 12 12
113 113 20 33 20 33 20 20 108 108 7 28 28 28 15 15 15 103



On Thu, Sep 19, 2013 at 5:16 PM, Bo Jacoby <[email protected]> wrote:

>    g=.-:&(+ (2&|*>:&+:)) NB. (g y)= 2%~1+3*y if y is odd, (g y)=2%~y if y
> is even.
>    f=.13 : '(g^:x)y'
>    f
>
> 4 : '(g^:x)y'
>
>
> I wonder why  f  is not translated into tacit code.
>
> It works nevertheless:
>    45 f 27
> 4616
> ----------------------------------------------------------------------
> 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