Set and bag
BEQUAL
bequal(Bag x
, Bag y
) -> Boolean
STABLE
Do bags x
and y
contain the same elements?
CONCATAGG
concatagg(Bag b
) -> Charstring
STABLE
Concatenate stringified elements in bag b
EXCLUSIVE
exclusive(Bag b
) -> Bag
STABLE
Return the singleton objects in bag b
FIRST
first(Bag b
) -> Object
STABLE
Pick the first element in bag b
(no order guarantees)
FIRST_N
first_n(Bag b
, Number n
) -> Object
STABLE
Get the n
first element in bag b
(no order guarantees)
INJECT
inject(Bag b
, Object o
) -> Bag
STABLE
Inject 'o' between elements in bag 'b'
IOTA
iota(Integer l
, Integer u
) -> Bag of Integer r
STABLE
Same as range(l,u)
LAST
last(Bag b
) -> Object
STABLE
Pick the last element in bag b
(no order guarantees)
NATURAL_NUMBERS
natural_numbers( ) -> Bag of Integer i
STABLE
The infinite set of all natural numbers i
REMOVE_NULL
remove_null(Bag b
) -> Bag
STABLE
Remove all tuples containing null values in bag b
ROWPROPS
rowprops(Vector props
, Vector vals)->Bag of (Object
, Object
)
STABLE
Generate bag of pairs from elements in vectors props
and vals
SAMPLE
sample(Bag b
, Integer s
) -> Bag
STABLE
Sample s
elements from bag b
SECTION
section(Bag b
, Number start
, Number stop
) -> Bag
STABLE
Sub-bag from position start
to stop
in bag b
(no order guarantees)
TUPLES
tuples(Bag b
) -> Bag of Vector
STABLE
The tuples in bag b
as vectors
UNION
union(Bag x
, Bag y
) -> Object
STABLE
The union of bags x
and y
UNIQUE
unique(Bag b
) -> Bag
STABLE
Remove duplicates in bag b