Use

f 'x'

.  For a similar tool, see ...\system\packages\misc\fndisplay.ijs .

Henry Rich

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Yuvaraj Athur Raghuvir
> Sent: Thursday, October 05, 2006 2:45 AM
> To: Programming forum
> Subject: [Jprogramming] Stumped on verbs that print...
> 
> In the article [1] John Howland introduces math_pat as
> math_pat =: 3 : 0
> '''',y.,'('',y.,'')''',LF,':',LF,'''',y.,'('',x.,'','',y.,'')'''
> )
> 
> Changing this to J6 syntax, I have
>    math_pat =: 3 : 0
> '''',y,'('',y,'')''',LF,':',LF,'''',y,'('',x,'','',y,'')'''
> )
>    math_pat 'f'
> 'f(',y,')'
> :
> 'f(',x,',',y,')'
> With this I defined
>    f =: (3 : (math_pat 'f')) :. (3 : (math_pat 'f_inv'))
> I expected that
> f x
> f(x)
> Instead, after enabling all possible display formats I get
>    f x
> f x
> --T-┐
> │f│x│
> L-+--
>   -- f
> -+- x
> f x
> 
> How can I get the desired parenthetic format? I want to study the J
> function composition rules using this technique.
> 
> ~Yuva
> 
> [1] http://www.cs.trinity.edu/~jhowland/math-talk/functional/
> 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to