Expanding (\) on Patterns --by Gregg W. Taylor Dallas, Texas challenged to iscern a pattern in the data or process, and efficiently code it into the system on which I am working. (On a bad day, I get to debug the programs that attempt to model these patte,rns, but which fail in the attempt.) APL has several native functions that aid in implementing the patterns that I find. These include functions like reshape (p),find (e_), replicate (/), and expand (\). This last function will ultimately be the subject of this article. But since I've mentioned a few functions, I feel it negligent not to say a few words about each. IfI knew who it was who first told me that it is helpful to view reshape (P) as a pattern generator, I would send him a year's subscription to Quote Quad or Mad magazine (his choice) out of shear gratitude. This insight has sped my development of programs on many occasions. Aside from the common patterns that we all use, like: A GOOD DAY OF PROGRAMMING, I will be (4p4 1)/' o+oo' oooo+ooooO (4p4 1)p"' o+oo' oooo + oooo 0 e(qp4 1)p"' o+oo' oooo+oooo0 1 2 3 4
/lp/association-for-computing-machinery/expanding-on-patterns-hJ9Zc2NJ0B