Group 3
J symbol (right-brace-dot): }.
Monadic case:
Name: behead
Rank: _ (infinite/unbounded) – applies to the entire array y
Definition: }. y removes the first item of y.
Please also include explanations for your answers to some of the following questions:
What is the result of removing the head of a vector?
What is the result of removing the head of a matrix?
What is the result of removing the head of a scalar?
What is the result of beheading an empty vector?
Dyadic case:
Name: drop
Rank: 1 (left); _ (right) – applies to a vector on the left and the entire array on the right
Definition (scalar x): x }. y drops at most x items from y. If x is positive, then items are dropped from the front of y. If x is negative, then the items are dropped from the back of y.
Definition (vector x): x }. y returns an array constructed from the elements of y indexed by dropping length xi of axis i of y, where xi is the i-th element of x. The axis is taken from the front if xi is positive, and from the back is xi is negative. If xi is infinity, then xi is the length of axis i of y.
Please also include explanations for your answers to some of the following questions:
What array is returned when x is positive?
What array is returned when x is negative?
What array is returned when x is greater than the number of items in y?
What array is returned when x is zero?
What array is returned when x is a vector?
What array is returned when x is a infinity?