Here is a better quote of what Don wrote. Below I was responding to an abbreviated version. My
response has some use but should not have invited Don to look up trains. I apologize, Don.
What remains from that unfortunate paragraph is that J doesn't waste anything, and has a good
use for (+/ *:) /Kip Murray
Don wrote:
I must have been one of the fortunate ones, because my education always
taught me to ask why. When I looked at tacit J for the first time, I asked
myself why I can write:
+/ *: 2 6 8 9
but have to write:
sumsq =: +/ @: *:
Why is that @: necessary?
J documentation is very good at explaining what and how - but contains
very little on why.
Kip Murray wrote:
Don, try
(+/ *:) 0 1 2 3 4
and look up II. F. Trains in the Dictionary (in J press F1 then click on
Dic).
For composition you can use [: +/ *: as in
([: +/ *:) 3 4
25
where [: is a true innovation, an "identity element" that reduces
reduces a "tree"
f
/ \
[: g
to
f
\
g
Kip Murray
2009/4/26 Don Watson <[email protected]>
1) Use %: for square root.
2) Use *: for square.
and so on.
+/ *: 2 6 8 9
but have to write:
sumsq =: +/ @: *:
Why is that @: necessary?
----------------------------------------------------------------------
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