The question was from a beginner. Chances are, f@:g would be more amenable for a beginner than [: f g. (There is a f jot g composition in conventional mathematics.)
----- Original Message ----- From: "Sherlock, Ric" <[email protected]> Date: Wednesday, February 3, 2010 19:09 Subject: Re: [Jprogramming] A q for starters - composing without forking (% +/ %) To: Programming forum <[email protected]> > > From: bill lam > > > > ĵaŭ, 04 Feb 2010, Sherlock Ric skribis: > > > > From: Roger Hui > > > > > > > > If you prefer to define a function > > > > using compositions (i.e. "tacitly"), then: > > > > > > > > f1=: % @: (+/) @: % > > > > > > > > is better. > > > > > > Note an alternative form of the above (using forks) is: > > > f1a=: [: % [: +/ % > > > > > > I know that I found that form easier to grasp when I was > first coming > > to grip with tacit. > > > > I prefer using @ or @: without spaces in between for short > phrases, so > > that it forms a compound word like %@:(+/)@:% that > is easily > > recognized in a sentence. > > That is my preferred usage now too and for the same reason. > > However I remember that I used to find that using primitives (@: > @ & &.) etc hard to reconcile with the concept of forks and > hooks. I preferred using Cap ( [: ) until I was comfortable with > which symbols were conjunctions, adverbs and verbs and how they > combined to form compound verbs. Cap seemed more straight > forward and I made fewer errors. For example I used to get very > confused about when it was necessary to enclose the expression > to the right of @ or @: in parentheses. I think it was one of > Raul's posts that got that sorted for me. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
