[Jprogramming] Verb display in function tables
Edward Mokurai Cherlin
mokurai at sugarlabs.org
Sat Feb 18 02:57:02 HKT 2012
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
More information about the Programming
mailing list