3 ms·
While J is mostly a transliteration of APL (with improvements like trains and forks, and other stuff) K is a different language. Arthur carefully picked the mo
by beagle3 13y ago
While J is mostly a transliteration of APL (with improvements like trains and forks, and other stuff)
K is a different language. Arthur carefully picked the most useful 20 monadic (unary) and 20 most useful dyadic (binary) function and put them on symbols that make sense and are easy to remember:
a+b is addition
+m is transpose (think of mathematical notation for transpose)
a*b is multiplication
*v is "first", like in C
a|b is max / or
|v is reverse (closet graphic to APL)
etc.
Also, K does away completely with matrices and uses nested vectors exclusively.