Yes that’s the one thanks Chris. It is very useful for better understanding 
complex combinations and I’m sure it would be well worth resurrecting, 
preferably with documentation and even a video (@Bob T?)

> On 25 Oct 2022, at 14:56, chris burke <cbu...@jsoftware.com> wrote:
> 
> I think this is Simon Garland's fgh script, which used to be
> distributed in system/packages/misc/fgh.ijs. For example:
> 
>   load '~temp/fgh.ijs'
> 
>   0 f g h 1
> 0 _f_ (g_ (h_ 1))
> 
> 
>   0 (f g h) 1
> (0 _f_ 1) _g_ (0 _h_ 1)
> 
> The script is below. Perhaps someone could check it, and then we put
> it in the addons?
> 
> -----------------------
> 
> NB. fgh.ijs
> NB.
> NB. displays calling sequence for simple J expressions, where:
> NB.
> NB.   f_       monadic f
> NB.   _f_      dyadic f
> NB.   _fI_     dyadic inverse of f etc..
> NB.
> NB. e.g.
> NB.   f g h 0
> NB.   (f g h) 0
> NB.   f&g 0
> NB.   f&.g 0
> NB.   0 f g 1
> NB.   f/1 2 3
> 
> bracket=: 3 : 0
> if. (1=$,y=.":y) do. y
> else. '(',y,')' end.
> )
> 
> f=: 3 : 0
> 'f_ ',bracket y
> :
> (bracket x),' _f_ ',bracket y
> )
> 
> g=: 3 : 0
> 'g_ ',bracket y
> :
> (bracket x),' _g_ ',bracket y
> )
> 
> h=: 3 : 0
> 'h_ ',bracket y
> :
> (bracket x),' _h_ ',bracket y
> )
> 
> i=: 3 : 0
> 'i_ ',bracket y
> :
> (bracket x),' _i_ ',bracket y
> )
> 
> fI=: 3 : 0
> 'fI_ ',bracket y
> :
> (bracket x),' _fI_ ',bracket y
> )
> 
> gI=: 3 : 0
> 'gI_ ',bracket y
> :
> (bracket x),' _gI_ ',bracket y
> )
> 
> hI=: 3 : 0
> 'hI_ ',bracket y
> :
> (bracket x),' _hI_ ',bracket y
> )
> 
> iI=: 3 : 0
> 'iI_ ',bracket y
> :
> (bracket x),' _iI_ ',bracket y
> )
> 
> NB. definitions in z locale:
> f_z_=: f_fgh_ :. fI_fgh_
> g_z_=: g_fgh_ :. gI_fgh_
> h_z_=: h_fgh_ :. hI_fgh_
> i_z_=: i_fgh_ :. iI_fgh_
> 
>> On Sun, Oct 23, 2022 at 10:45 PM Richard Donovan <rsdono...@hotmail.com> 
>> wrote:
>> 
>> Many years ago (J4 or J6) I remember there was a function that showed how 
>> hooks and trains etc were expanded, using such output as x _f_ g_ y etc 
>> (where _f_ indicated dyad etc). Does anyone know of this and whether it 
>> still exists?
>> 
>> Thanks in advance
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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