Vocabulary: Difference between revisions
(→Dyad) |
(→Matrix) |
||
Line 36: | Line 36: | ||
== Matrix == |
== Matrix == |
||
A matrix is a 2D array (a list of lists) where all elements have the same length. |
|||
== Shape == |
== Shape == |
||
== Conform == |
== Conform == |
Revision as of 16:03, 24 January 2022
The following page documents K related words. All definitions written here should be hence treated as such, and not as an extension of their English counterparts.
Noun
A noun is a basic value in K, which can be a:
- Number
- Character
- Symbol
- Function
- Dictionary
- Array
- Table
Verb
A verb is a primitive function in K. K has 20 primitive verbs which represent multiple overloads that form its base functionality.
Adverb
An adverb is a primitive syntactical form in K which takes 1 or 2 functions on the left and changes their functionality.
Dictionary
A K dictionary is a mapping from a set of K nouns as keys to a set of K nouns which constitute the values of the dictionary. Keys may not need to be unique, depending on the K version.
Function
A function can be a:
- Primitive verb
- Lambda
- Train
- Projection of any of the above.
Valence
The valence of a noun which supports application(function, array, dict) is the number of arguments it can take. K primitives are usually multi-valent and support different overloads for different valences.
Monad
A Monad is a function which has valence 1 (single argument function).
Dyad
A Dyad is a function which has valence 2 (two argument function).
Matrix
A matrix is a 2D array (a list of lists) where all elements have the same length.