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foJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCCpt:o texto multilinha _
Reports the part of the first string up to the first instance of the second string inside it. If the second string isn't found, reports the entire first string.pt:o texto de _ antes de _
Reports the portion of the first input string starting after the first occurrence of the second string. If the second string isn't found in the first string, reports an empty string.pt:o texto de _ depois de _
Reports the character position (starting from 1) of the beginning of the first input string inside the second input string.
If it's not found, reports 0.pt:a posição de _ em _
If input is TRUE, comparisons made by functions in the string library will be case-independent (so "FOO" = "foo"). This is the default.
If input is FALSE, comparisons will be exact.pt:altera comparações ignorando distinção minúsculas/maiúsculas para _
Reports the portion of the first input (string) starting at the position given by the second input (counting from 1, like LETTER n OF) and ending at the position given by the third input (also counting from 1). If the third input is empty, reports the portion from the first position to the end of the string.
If a position number is negative, counts from the end backward, so -1 is the last character, -2 is the next to last, etc.pt:o texto de _ entre as posições _ e _ , inclusive
Reports True if the first input string contains the second input string, otherwise false.
Comparison is case-independent by default; use USE CASE-INDEPENDENT COMPARISONS to change that.pt:o texto de _ antes de _
Reports the input text with lower case letters instead of capital letters in the input. Uses the user's locale's rules for case conversion.pt:em minúsculas _
The stream version of IN FRONT OF.
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is here in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:a prefixação de _ ao canal _
The stream version of ITEM 1 OF.
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:o primeiro item do canal _
The stream version of ALL BUT FIRST OF.
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:um canal com todos os itens de _ menos o primeiro
423true4The stream version of variadic MAP (any number of input lists, like
MULTIMAP in the list utilities library).
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:a aplicação de _ aos itens dos canais _
The stream version of KEEP.
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:os itens tais que _ do canal _
The inputs are a stream and a positive integer. SHOW STREAM reports a
regular finite list of length less than (for short finite streams) or equal to the
second input. It's useful because an infinite stream can't be displayed in a
finite amount of time.pt:uma lista com os itens do canal _ até ao _ º
1001Make a stream from a finite collection of items, like the LIST primitive.
Since this block is typically used for small amounts of data, it does not
delay computation of its inputs.pt:um canal com _
1Call this block with STREAM WITH NUMBERS FROM 2
as its input to get the infinite stream of all the prime numbers.
It's called SIEVE because the algorithm it uses is the Sieve of
Eratosthenes (clickable link):
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
Look inside; it's a beautifully elegant algorithm.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:a crivagem do canal _
The stream version of NUMBERS FROM 1 TO, with no
ending number because it reports the infinite stream of all
the integers greater than or equal to its input.
Read the code! It's deceptively simple.
Streams, also called lazy lists, are like lists except that
items are not computed until they're needed. This allows
for more efficient handling of large computed lists, and
even infinite lists. The only piece of magic is in
IN FRONT OF STREAM, whose second input is of type
Unevaluated, which means that it's a procedure, with
a sort of invisible gray ring. So HEAD OF STREAM is just
ITEM 1 OF, but TAIL OF STREAM has a CALL block
to make the computation happen.
For a tutorial introduction to streams, read SICP 3.5:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
or Brian's lecture notes (start on page 74):
https://people.eecs.berkeley.edu/~bh/61a-pages/Volume2/notes.pdf
The above are clickable links!pt:um canal com os números a partir de _
1Read the code while running it, The first input is a shape list as in
SHAPE OF. The output is an array with those dimensions containing the atomic items of the second input,
repeating values if more are needed.Reports a flat list of the maximum size of the input array along
each dimension: number of rows, number of columns, etc.
"Maximum" because it works even if the array isn't uniformly shaped.Reports the greater of its two inputs. Works on strings too.Reports a flat list of all the atomic elements
of sublists of the input list.Given two arrays A and B, reports an array whose dimensions are
APPEND(SHAPE OF (A), SHAPE OF (B))
in which each atomic item of the result is computed by applying the dyadic function input to an item of A and an item of B.1Reports its input.
This is useful to fit a value into a different-type input slot, e.g., number into list slot.Reports the number of dimensions of the input.111Takes a multidimensional array, and
reports an array whose dimensions
are reversed (as reported by
SHAPE OF). In the case of a
two-dimensional array, does the usual transposition of rows and columns.If there are no atomic data, we don't have any shape information, so we can't really transpose it. But an empty list is 0 rows of some number of columns, so the transpose should be 0 columns in some number of rows. We arbitrarily make it 0 columns of one row. This at least has one dimension of the shape correct.1The transpose of a vector is just the vector itself.1This is the opposite no-atomic-data situation from above. We know that there are (length array) rows of 0 columns, so the transpose is 0 rows, i.e., an empty list. But we lose the number of original rows, transpose columns.atomnodeThis is one row, n columns. So the transpose is n rows, one column.Reverses the order of the (toplevel) items of the input.
If the input is a matrix, this means it reverses the order of the rows, which is a reflection through a horizontal axis, as the ⦵ symbol suggests.1Recursively deep-inserts
the items of the first input
into the items of the second
input. If the first input is not
a list, then it is inserted with
IN FRONT OF in the second
unless the second also isn't
a list, in which case they are
combined with LIST.1Like MAP, but can take any number of lists
as inputs. The lists must all be the same size.
The function input must take a number of inputs
equal to the number of lists. MULTIMAP calls
the function with all the first items, then all the
second items, and so on.1Takes a (possibly deep) list as input,
and reports a human-readable text form
of the list (namely, Lisp notation).()Computes a generalized matrix multiplication.
In normal matrix multiplication, each cell of the result
is computed by multiplying individual numbers within
a row of the left input and a column of the right input,
and then adding those products. In APL terms this is
+.× ("plus dot times")
Any dyadic functions can replace addition and multiplication in this algorithm; a common case is
∨.∧ ("or dot and")111111Reports the smaller of its two inputs.Computes logarithms in any base.
The base is the left input. It's usual in APL that if there's a main data input and some sort of control input, the latter comes on the left. This is because APL syntax, unless you use parentheses, groups computations from right to left.
APL has a monadic version of this function that computes natural logs (log to the base e).Computes the number of combinations of right-input things taken left-input at a time, otherwise known as the elements of Pascal's triangle. This block shares the ! symbol with the monadic factorial function, because the formula for computing this function uses factorials.The factorial of a positive integer n is the product of the integers from 1 to n.
In real APL, the domain of this function is extended beyond integers to compute the gamma function.This function has two names because there are two ways
to understand it.
Lisp way: A matrix is a list of rows. This block combines the numbers in each row, producing one value for the entire row.
APL way: A matrix is made of vectors. This block takes each column as a vector, and does vector arithmetic on the columns, producing one column as the result.pt:lança o erro _
Acts just like the function selected from
the pulldown menu, but hyperized, so
comparing two equal-sized lists reports
a list of the same length as the inputs,
with the results of item-by-item comparisons.﹦﹦
≠
identical to
and
or
is _ a _?Report a list with left-input random integers in the range 1 to right-input.
No number appears more than once
in the result.choicechoice11Reports 1 if the input is positive,
0 if the input is zero,
or -1 if the input is negative.0falsereports 1 divided
by its input.This block reports a random integer between 1 and its input. To roll more than one die, use (for three dice)
roll (reshape as 3 items of 6)
APL: ?3⍴6
Don't use reshape as 3 items of roll 6, because that would roll one die and report 3 copies of the same random roll. Reports the greatest common divisor of its inputs.
If the inputs are values in {0,1} then this is equivalent to the logical OR of the values, with 0=False, 1=True. Hence the APL symbol ∨.
Also accepts Snap! Booleans as inputs.abTakes a dyadic scalar function as input, and
hyperizes it, so that it can take lists as inputs.abReports True if the input is an APL scalar,
i.e., either an atomic (non-list) value, or
an array (list of lists) of any depth with only
one atomic item, e.g., (list (list (list (3)))).1The input must be a value for which SCALAR? reports true, i.e., either an atom or a list of any depth but only one scalar item of item of... etc. This function returns the underlying scalar (number, etc.).1Reports the least common multiple of its inputs.
If the inputs are values in {0,1} then this is equivalent to the logical AND of the values, with 0=False, 1=True. Hence the APL symbol ∧.
Also accepts Snap! Booleans as inputs.abReports the not-and of its inputs, in the form
0 for false, 1 for true.Reports 1 if the input is False or 0;
otherwise reports 0.Reports the not-and of its inputs, in the form
0 for false, 1 for true.Reports True if the left input is
less than or equal to the right input.
Reports a Snap! Boolean, not an integer 0 or 1.Reports True if the left input is
greater than than or equal to
the right input.
Reports a Snap! Boolean, not an integer 0 or 1.Reports 0 if its inputs are equal;
reports 1 if its inputs are not equal.
The inputs can have any non-list values.
(Lists are hyperized.) If the inputs are
Booleans (True/False or 1/0), this is
also the exclusive-or function.reports True iff the input is 0 or False.Reports a Snap! Boolean False if the input
is False or 0; reports True otherwise.Make scalar called with non-singleton input If the input is a positive integer, reports a list of the numbers
from 1 to that input. (If the input is 0, reports an empty list.)
If the input is a list of positive integers, reports an array with
the shape specified by the input (as in ⍴ reshape) in which
each item is a list of the indices of that item in the array
(so technically the shape has one more dimension
than the input, whose size is the size of the input).If the rank of the left input is one more than the rank of the right input,
reports the index of the right input in the left input, or if not found,
reports one more than the length of the left input.
If the rank of the left input is equal to the rank of the right input,
reports a vector of the indices of the items of the right input
in the left input (mapping this function over the right input).
If the rank of the left input is more than that of the right input by 2 or more,
reports a vector, the location of the right input in the left in each dimension.
It is an error if the rank of the left input is less than that of the right input.1resultThis isn't an APL function, although it's related to the outer product.
It takes any number of lists, and reports a list of all possible tuples with one item from each of the lists. The length of the result is the product of the lengths of the inputs.Reports an array of Booleans the same shape
as the left input, indicating which of the atoms
in the left input appear anywhere in the right
input.
(The structure of the right input doesn't matter.)Like append, but:
A scalar input is treated as an array the same shape as the other input except that the last item of the shape is 1.
If the two inputs are of different ranks,
the function is mapped over the larger ranked input.
Catenate adds new columns, by appending to each row.If the input is a nesting of length=1 lists, which
APL treats as a scalar (the innermost item)
for many purposes, report that innermost scalar.
Otherwise, report the input as is.
Exposing this block for users is important because Snap! /does not/ treat such a nesting
as a scalar, so you might need to use this in
translating an APL program to Snap!.
(But the functions in the APL library already use
this block as needed.)Reports a vector of indices of the items of the input, in order of the values of the items, so that
item (grade up (foo)) of (foo)
reports the items in sorted order, smallest to largest. For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot. For a list of numbers, using < as the comparison function will sort from low to high; using > will sort from high to low.ca:ordena _ segons criteri _
copy of datasplitmerge11#1#2Compares two vectors for sorting.
Compare first items; if those are equal compare second items; etc.1111Reports a vector of indices of the items of the input, in order of the values of the items, so that
item (grade down (foo)) of (foo)
reports the items in sorted order, largest to smallest. For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.The left input must be a vector of Booleans
(either Snap! form or APL form); the right input must be an array whose first dimension is equal to the length of the left input. The block reports an array of the same rank as the right input, containing only those items (rows, for a matrix) for which the corresponding Boolean is True (or 1).The left input must be a vector of Booleans
(either Snap! form or APL form); the right input must be an array whose last dimension is equal to the length of the left input. The block reports an array of the same rank as the right input, containing only those items (columns, for a matrix) for which the corresponding Boolean is True (or 1).Turns a row-wise (in Lisp terminology) function
into a column-wise one.Reverses the order of the columns of the input, which is a reflection through a vertical axis, as the ⏀ symbol suggests.This function has two names because there are two ways
to understand it.
Lisp way: A matrix is a list of rows. This block turns it into a list of columns, and combines the numbers in each column, producing one value for the entire column.
APL way: A matrix is made of vectors. This block takes each row as a vector, and does vector arithmetic on the rows, producing one row as the result.Like append, but:
A scalar input is treated as a vector
of length 1.
If the two inputs are of different ranks,
the function is mapped over the larger ranked input.
Catenate vertically adds new rows, by appending to each column.A hyperblock version of JOIN. The regular JOIN isn't hyperized because it can accept a list as input, representing it as text.A positive left input selects the first n items of the right input.
A negative left input selects the last abs(n) items
of the right input.
If the right input is a matrix, a numeric left input selects rows;
the left input may also be a two-item vector, in which case
the first number is applied to the rows
and the second number is applied to the columns.
Similarly for higher-dimension arrays. 10valueindexA positive left input selects all but the first n items of the right input.
A negative left input selects all but the last abs(n) items
of the right input.
If the right input is a matrix, a numeric left input selects rows;
the left input may also be a two-item vector, in which case
the first number is applied to the rows
and the second number is applied to the columns.
Similarly for higher-dimension arrays. 0valueindex0partialpartialApplies the function to each "atom" of the data. What's an atom?
Something for which the predicate input reports true.11