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

Reply via email to