Function-based selection from one-dimensional arrays

Uses
- Element selection from one-dimensional arrays
- Function application to one-dimensional arrays

Elements can be selected from an array based on a boolean test function:
s:𝕊, select(s 𝔹, Array1D(s)) : Array1D(s)
s_:𝕊, f:(s_ 𝔹), A:Array1D(s_), select(f, A) ⇒ select(f[A], A)

TODO: the sort of this operator is wrong. The result can be empty, but EmptyArray1D is not a subsort of Array1D(𝕊). Fixing this probably requires revising the whole array hierarchy.

Examples

Uses example Integers, example Term equality

Define
example odd : 𝔹
example odd[x:] ⇒ (x rem 2) == 1

Then:
example select(odd, {[1, 2, 3, 4]}) ⇒ {[1, 3]}
example select(odd, {[2, 4]}) ⇒ {[]}