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
┌─┬─┐
│f│x│
└─┴─┘
 ┌─ 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