I often do that myself, but in this case, the original phrase was also generating a 1 element vector, so I decided that a 1-element vector was an appropriate result.
-- Raul On Sat, Feb 18, 2012 at 9:48 AM, Dan Bron <j...@bron.us> wrote: > Because in many contexts, a scalar is more convenient than a 1-element > vector, I make a habit of tacking on a {. as in {.u`'' . > > -Dan > > > On Feb 18, 2012, at 9:32 AM, Raul Miller <rauldmil...@gmail.com> wrote: > >> I would use u`'' >> >> avg 1 :'u`''''' >> +---+ >> |avg| >> +---+ >> avg >> |value error: avg >> >> -- >> Raul >> >> >> On Fri, Feb 17, 2012 at 1:57 PM, Edward Mokurai Cherlin >> <moku...@sugarlabs.org> wrote: >>> I had thought that I would not be able to get a program to show the >>> definition of a function given its name, but I found a kludge for the >>> purpose using tie. Now I would like to know whether somebody has a >>> direct solution. My application for this capability is a defined >>> adverb for producing function tables. >>> >>> t=.1 :(':';'2 2$(>1 0#u`u);y;(,.x);x u/ y') >>> l +t l=.i.5 >>> ┌─┬─────────┐ >>> │+│0 1 2 3 4│ >>> ├─┼─────────┤ >>> │0│0 1 2 3 4│ >>> │1│1 2 3 4 5│ >>> │2│2 3 4 5 6│ >>> │3│3 4 5 6 7│ >>> │4│4 5 6 7 8│ >>> └─┴─────────┘ >>> >>> The question then is whether somebody knows a less ugly way to display >>> the value of u in executing this adverb than >1 0#u`u or >0{u`u . >>> >>> -- >>> Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin >>> Silent Thunder is my name, and Children are my nation. >>> The Cosmos is my dwelling place, the Truth my destination. >>> http://wiki.sugarlabs.org/go/Replacing_Textbooks >>> ---------------------------------------------------------------------- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm