# Write a function that takes a numeric array as its right argument and
# returns the mean (average) of the array.
Prob1 ⇐ +˝÷1⌈≠
# Write a function that takes a numeric vector as its right argument
# and returns the median of the array.
Prob2 ⇐ (+´÷≠) ∧⊏˜·(⌊≍⌈)2÷˜1-˜≠
# Write a function that takes a numeric vector or scalar as its right
# argument and returns the mode (that is, the most common value) of the
# array. If more than one number occurs the greatest number of times,
# return all such numbers.
Prob3 ⇐ ⊑¨·((⊢=⌈´)≠¨)⊸/⊐⊸⊔
# Write a function that takes vectors as its left and right arguments and
# returns them “meshed” into a single vector formed by alternately
# taking successive elements from each argument. The arguments do not
# have to be the same length.
# Prob4 ⇐ ⥊⍉∘≍ # works for same length only
Prob4 ⇐ ∾○(↕≠)⍋⊸⊏∾
# Write a function that takes a vector as its right argument and returns
# elements that occur only once in the vector.
Prob5 ⇐ (∊∧∊⌾⌽)⊸/
# Write a function that takes a vector of vectors as its right argument
# and returns it sorted by the length of each element. An element of
# the vector can be scalar or an empty vector.
Prob6 ⇐ (⍋≠¨)⊸⊏
# Write a function that takes a numeric vector and returns all elements
# that are divisible by 3 or 5.
Prob7 ⇐ (0⊸∊3‿5⊸|)˘⊸/
# Write a function that takes a numeric vector and returns a two element
# vector whose first element contains the values less than 0 (zero) in
# the vector and the second element contains all values greater than or
# equal to 0.
Prob8 ⇐ (≥⟜0∾2˙)⊸⊔
# Write a function that takes a character vector as its right argument
# and one or more characters as its left argument, where those characters
# are delimiters in the right argument. The function should return the
# delimited text as a vector of vectors.
Prob9 ⇐ (⊢-˜¬×+`)∘=⊔⊢
# Suppose you have a numeric vector that is the list of prices for a
# set of retail products. You also have a numeric vector that is the
# number ordered of each product. Write a function that takes as its
# right argument a vector of prices and as its left argument a numeric
# vector that indicates the number ordered and returns the total cost
# for the order.
Prob10 ⇐ +˝∘×⎉1‿∞