plus_scan(a) {[a] [a] :: (a in number)}
Given a sequence of numbers, plus_scan returns to each position
of a new equal-length sequence, the sum of all previous
positions in the source.
For example:
4pt
max_scan(a) {[a] [a] :: (a in ordinal)}
Given a sequence of ordinals, max_scan returns to each position
of a new equal-length sequence, the maximum of all previous
positions in the source.
For example:
4pt
min_scan(a) {[a] [a] :: (a in ordinal)}
Given a sequence of ordinals, min_scan returns to each position
of a new equal-length sequence, the minimum of all previous
positions in the source.
or_scan(a) {[a] [a] :: (a in logical)}
A scan using logical-or on a sequence of logicals.
and_scan(a) {[a] [a] :: (a in logical)}
A scan using logical-and on a sequence of logicals.
iseq(s, d, e) {(int, int, int) [int]}
Returns a set of indices starting at s, increasing
by d, and finishing before e.
For example:
4pt
sum(v) {[a] a :: (a in number)}
Given a sequence of numbers, sum returns
their sum.
For example:
4pt
max_val(v) {[a] a :: (a in ordinal)}
Given a sequence of ordinals, max_val returns
their maximum.
min_val(v) {[a] a :: (a in ordinal)}
See max_val.
any(v) {[a] a :: (a in logical)}
Given a sequence of booleans, any returns t iff any of
them are t.
all(v) {[a] a :: (a in logical)}
Given a sequence of booleans, all returns t iff all of
them are t.
count(v) {[bool] int}
Counts the number of t flags in a boolean sequence.
For example:
4pt
max_index(v) {[a] int :: (a in ordinal)}
Given a sequence of ordinals, max_index
returns the index of the maximum value. If several values
are equal, it returns the leftmost index.
For example:
4pt
min_index(v) {[a] int :: (a in ordinal)}
Given a sequence of ordinals, min_index
returns the index of the minimum value. If several values
are equal, it returns the leftmost index.