While there are other Jems, I wouldn't be so quick to dismiss +/%# . http://www.jsoftware.com/papers/average.htm http://www.vector.org.uk/?vol=24&no=2&art=insession
As well (since we are talking about introducing J), don't forget x+y x>.y etc. You are so used to these that you take them for granted. ----- Original Message ----- From: Dan Bron <[email protected]> Date: Friday, August 13, 2010 7:33 Subject: [Jprogramming] Jems To: 'Programming forum' <[email protected]> > When introducing J, we often point to +/ # % as a > sterling example of J's > stark clarity. In fact, we've done it so much, it's become > something of a > cliche; though true, it begins to ring hollow. > > > > So let's introduce some variety. What other phrases could > we substitute as > exemplars? > > > > Perusing http://www.jsoftware.com/jwiki/Essays/Polyminoes this > morning, I am > reminded of the phrase for all permutations: > > > > A.&i.~ ! NB. For input N, produces all > permutations of order N (in lex. order) > > > > This monad is a good candidate for several reasons, particularly > those which > render it lean and spare with nothing superfluous (a > characteristic it > shares with +/%#, and which greatly contributes to the latter's fame). > > > > - succinctly describes a well-known concept (permutations, > AKA anagrams). > > - leverages J's unique train syntax. > > - whereas +/%# is a good example of a fork, > A.&i.~! is a good example of a hook. > > - doesn't mention its arguments (even by reference with []), > and so a great specimen of tacit expression. > > - &i. is a sophisticated use of duality (one of J's more > unique composition operations). > > - mnemonic (A. recalls Anagrams, ! recalls permutations > [factorials and permutations are closely related]) > > - aesthetically balanced (the inflections on A and i reflect > each other, as the ! reflects the i) > > > > What other Jems are suitable to introduce the language? > Why do you think > so? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
