This advice is sound. It brings to mind something as told to me by Ken, as told to Ken by Howard Aiken: A systems is made up of components; a component is something you understand.
----- Original Message ----- From: Don Guinn <[email protected]> Date: Thursday, February 11, 2010 18:59 Subject: Re: [Jprogramming] More newbie tacit headscratching: Dyads (eg nPr) To: Programming forum <[email protected]> > With practice you will be able to build more complex definitions > tacitly;however, there are benefits to making the definition is > steps. Each step > handling an easily understood thought. In your case you have > three steps, > not too difficult to handle in one step, but can illustrate how > you can > handle tacit definitions which are much more complex. > > Take your three steps: > > nCr =: !~ > n14Cr =: 14&nCr > n14Cr2=: ! * n14Cr > n14Cr2 3 > 2184 > > Looks like it works. But it still references all the definitions > of each > step. There is an adverb f. (Fix) which substitutes primitives > for defined > names. > > n14Cr2=: (! * n14Cr) f. > n14Cr2 > +-+-+------------+ > |!|*|+--+-+-----+| > | | ||14|&|+-+-+|| > | | || | ||!|~||| > | | || | |+-+-+|| > | | |+--+-+-----+| > +-+-+------------+ > > Notice that now n14Cr2 is all primitives. The references were > removed. It > still works. > > n14Cr2 3 > 2184 > > If you would like to see it in text form use 5!:5 to see it in > text form. > > 5!:5<'n14Cr2' > ! * 14&(!~) > > This is not a very complex definition, but with this process you > can build > extremely complex tacit definitions in many steps, each step > testable to > verify its validity. And using the steps, debug at the step > level to find > errors. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
