Here is verb table from the z locale.  Does it help?

     table
  1 : (':'; '(((#~LF-.@e.])5!:5<''u'');,.y),.({.;}.)":x,y u/x')~

     +table 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│
  └─┴─────────┘

On 2/17/2012 12:57 PM, Edward Mokurai Cherlin 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 .
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to