NB. j programmers MUST understand data flow. NB. x f^:3 y differs from (f&y)^:3 x
f NB. function f visualizes data routing. 3 : 0 'f';<y : x;'f';<y ) x NB. nouns x and y are data. x =: 'x' X y Y x f x f x f y NB. GOAL. +-+-+-------------+ |X|f|+-+-+-------+| | | ||X|f|+-+-+-+|| | | || | ||X|f|Y||| | | || | |+-+-+-+|| | | |+-+-+-------+| +-+-+-------------+ x f^:3 y NB. CORRECT. +-+-+-------------+ |X|f|+-+-+-------+| | | ||X|f|+-+-+-+|| | | || | ||X|f|Y||| | | || | |+-+-+-+|| | | |+-+-+-------+| +-+-+-------------+ (f&y)^:3 x NB. WRONG +-------------+-+-+ |+-------+-+-+|f|Y| ||+-+-+-+|f|Y|| | | |||X|f|Y|| | || | | ||+-+-+-+| | || | | |+-------+-+-+| | | +-------------+-+-+ > From: Don Guinn <[email protected]> > Subject: Re: [Jprogramming] recursive composition > To: Programming forum <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > Actually that isn't right. It should be (f&y)^:3 x But don't get hung > up on > the difference. Look at ^: in the Dictionary. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
