Group 7
J symbol (vertical-bar-dot): |.
Monadic case:
Name: reverse
Rank: _ (infinity/unbounded) – applies to entire array
Definition: |. y returns y with the order of the items of y reversed.
Please also include explanations for your answers to some of the following questions:
Whis is the reverse of a string?
What is a palindrome?
What is the reverse of a single number?
What is the reverse of a matrix?
Dyadic case:
Name: rotate
Rank: 1 (left); _ (right) – applies to a vector on the left and the entire array on the right
Definition (scalar x): x |. y rotates the order of the items of y by x positions. Items are rotated to the front if x is positive, and to the back if x is negative.
Definition (vector x): x |. y rotates the order of the elements aligned along axis i of y by xi positions, where xi is the element at position i of x. Items are rotated to the front if x is positive, and to the back if x is negative.
Please also include explanations for your answers to some of the following questions:
What is the result when x is positive/negative number and y is a vector?
What is the result when x is positive/negative number and y is a matrix?
What is the result when x is vector containing positive and negative numbers?