Write a function that takes a right argument that is a character vector or scalar representing a DNA string (whose alphabet contains the symbols 'A', 'C', 'G', and 'T') and returns a 4-element numeric vector containing the counts of each symbol 'A', 'C', 'G', and 'T' respectively.
Write a function that takes right and left arguments that are character vectors or scalars of equal length – these represent DNA strings – and returns an integer representing the Hamming distance (the number of differences in corresponding positions) between the arguments.
Write a function that takes right and left arguments that are arrays of arbitrary rank, depth, and value, and returns a vector of all elements that appear in either of the two argument arrays but not in both.
Write a function that takes a right argument that is a Boolean scalar or vector and returns the length of the longest sequence of consecutive 1s.
Write a function that takes a scalar integer argument and returns a character matrix comprised of spaces and
⎕
that resembles a left-to-right ascending stairway.
Write a monadic function that takes an argument
n that is an integer scalar in the range 0-100 and returns a square matrix "pyramid" with
0⌈¯1+2×n rows and columns of
n increasing concentric levels.
Write a function that takes a right argument that is a non-decreasing vector or scalar of strictly positive integers, representing a set of scores and returns a numeric vector of the place for each score; for duplicate scores, it returns the average of the places they hold.
Write a function that takes non-empty character vector or scalar arguments and returns a 2-element vector of character vectors in which the right argument is split immediately before the
first occurence of
any element in the left argument.
Write a function that takes a right argument that is a numeric scalar or non-empty vector and takes a left argument
X that represents the number of neighboring elements on either side of each element in
Y and returns a numeric vector or scalar where each element is the average (mean) of the corresponding element in
Y and its
X neighbors on either side.
Write a function that takes a right argument that is a character vector or scalar representing a valid non-negative integer and a left argument that is a character scalar "separator" character and returns a character vector that is a representation of the right argument formatted such that the separator character is found between trailing groups of 3 digits.