Glossary of J terms
- Adverb
– An adverb is a J word (higher-order function) that operates on
a J noun (data) or verb (first-order function) on its left side and
(usually) produce a J verb. Example: In the J phrase +/, the adverb insert (/) takes the verb add (+) and returns the verb add over (i.e., add all the items in the array).
- Array – An array is a ordered collection of data items. The first item, whose index (position) is 0 is the head of the array. Example: The array 3 5 2 9 has four items, where the first item is 3 and the last is 9.
- Atom
– An atom (scalar) is an array whose only part is itself (i.e.,
it has no further parts). Example: The number 102 is an atom; the
character 'a' is an atom.
- Axis
– An axis is a direction along which the elements of an array are
aligned (positioned). Example: A vector has one axis; a matrix has two
axes.
- Box
– A box is a J data type analogous to a pointer in other
programming languages. It allows large arrays to be treated as a scalar.
- Cell – The components (subarrays) of an array to which a verb gets applied. Example
- Character – A character is
- Conjunction
– A conjunction is a J word (higher-order function) that operates
on a J noun (data) or verb (first-order function) on its left and right
sides to produce a J noun or verb. Example: In the J phrase sin^:2, the conjunction power (^:) takes the verb sin (sine function) on the left and the number 2 on the right and returns the verb sin square (i.e., sine of sine of argument).
- Data type
– A data type is a set of values. J has three fundamental data
types: numeric (numbers); literal (characters); and box. The
application of some J verbs (first-order functions) is restricted to
particular data types. Example: The J verb add (+) applies only to numeric data (i.e., numbers); the J verb head ({), which returns the first array item, is unrestricted because all data are arrays.
- Data structure – A data structure is the way the components of data are organized. All J data are organized in the form of arrays.
- Dyad (dyadic) – A dyad is a J verb that takes two J nouns (arguments), one on its left and one on its right.
- Element – An element is the smaller part of an array (i.e., 0-cells on an array). Example: The elements of the array (string) 'abc' are the individual characters 'a', 'b' and 'c'.
- Empty array – An empty array is an array that has no items (i.e., where the length of its first axis is 0).
- Evaluate
– The process of determining the value of a J expression. All
nouns evaluate to themselves. Example: The J expression 2 + 3 evaluates
to 5.
- Execution window – The execution window is the J window where J expressions are evaluated.
- Frame – The frame is the array in which the results of a verb applied to cells are arranged.
- Function (first-order) – A first-order function operates on data to produce data. Example: The J verb add (+) is a first-order function that operates on numbers to produce numbers.
- Function (higher-order) – A higher-order function operates on, or produces a function. Example: The J adverb insert (/) operates on first-order functions (e.g., add) producing the first-order function add over.
- Index – The index identifies the positions of the items on an array. The index 0 identifies the first item of an array. Example: The index (position) of item 'c' in the array 'abcd' is 2.
- Item – The items of an array are the parts of the array aligned along the first axis. If an array has r axes then the items have r-1 axes. Example:
The items of an array with three axes are matrices; the items of a
matrix are vectors; the items of a vector are scalars; the items of a
scalar is itself.
- Length, of axis – The length of an axis is the number of elements aligned along it. Example: The vector 1 2 3 4 has one axis with length 4.
- List – A list is an array with one axis.
- Literal – Literal is the J data type of characters and strings. Example: 'a' is a literal; 'string' is a literal.
- Matrix – A matrix is an array with two axes.
- Monad (monadic) – A monad is a J verb that takes only one J noun (argument) on its right side.
- Noun – A noun is any J data.
- Numeric – Numeric is the J data type of numbers. Example: 0 is a numeric
- Rank of noun – The rank of a noun is the number of array axes.
- Rank of verb – The rank of a verb is the rank of the noun to which the verb gets applied.
- Scalar – A scalar is an array with no axes. Example: The number 3 is a scalar; the character 'a' is a scalar; a box is a scalar.
- Shape – The shape of an array is the list of the length of each of its axes in order of first to last axis.
- String – A string is a list (vector) of characters (i.e., a one-axis array of literals). Example: 'abc' is a string.
- Table – A table is a two-axis array.
- Vector – A vector is a one-axis array. Example: 1 2 3 4, where the length of its axis is 4.
- Verb – A verb is a J word (first-order function) that applies to J nouns (data).
- Word – A J word is sequence of J alphabetic characters that has meaning independent of other sequences.