StackAggregate SΒΆ

aggcat.spad line 299 [edit on github]

A stack is a bag where the last item inserted is the first item extracted.

#: % -> NonNegativeInteger

from Aggregate

=: (%, %) -> Boolean if S has BasicType

from BasicType

~=: (%, %) -> Boolean if S has BasicType

from BasicType

any?: (S -> Boolean, %) -> Boolean

from HomogeneousAggregate S

coerce: % -> OutputForm if S has CoercibleTo OutputForm

from CoercibleTo OutputForm

construct: List S -> %

from Collection S

convert: % -> InputForm if S has ConvertibleTo InputForm

from ConvertibleTo InputForm

copy: % -> %

from Aggregate

count: (S -> Boolean, %) -> NonNegativeInteger

from HomogeneousAggregate S

count: (S, %) -> NonNegativeInteger if S has BasicType

from HomogeneousAggregate S

empty?: % -> Boolean

from Aggregate

empty: () -> %

from Aggregate

eq?: (%, %) -> Boolean

from Aggregate

eval: (%, Equation S) -> % if S has Evalable S and S has SetCategory

from Evalable S

eval: (%, List Equation S) -> % if S has Evalable S and S has SetCategory

from Evalable S

eval: (%, List S, List S) -> % if S has Evalable S and S has SetCategory

from InnerEvalable(S, S)

eval: (%, S, S) -> % if S has Evalable S and S has SetCategory

from InnerEvalable(S, S)

every?: (S -> Boolean, %) -> Boolean

from HomogeneousAggregate S

extract!: % -> S

from BagAggregate S

find: (S -> Boolean, %) -> Union(S, failed)

from Collection S

hash: % -> SingleInteger if S has Hashable

from Hashable

hashUpdate!: (HashState, %) -> HashState if S has Hashable

from Hashable

insert!: (S, %) -> %

from BagAggregate S

inspect: % -> S

from BagAggregate S

latex: % -> String if S has SetCategory

from SetCategory

less?: (%, NonNegativeInteger) -> Boolean

from Aggregate

map!: (S -> S, %) -> %

from HomogeneousAggregate S

map: (S -> S, %) -> %

from HomogeneousAggregate S

max: % -> S if S has OrderedSet

from HomogeneousAggregate S

max: ((S, S) -> Boolean, %) -> S

from HomogeneousAggregate S

member?: (S, %) -> Boolean if S has BasicType

from HomogeneousAggregate S

members: % -> List S

from HomogeneousAggregate S

min: % -> S if S has OrderedSet

from HomogeneousAggregate S

more?: (%, NonNegativeInteger) -> Boolean

from Aggregate

parts: % -> List S

from HomogeneousAggregate S

pop!: % -> S

pop!(s) returns the top element x, destructively removing x from s. Note: Use top(s) to obtain x without removing it from s. Error: if s is empty.

push!: (S, %) -> S

push!(x, s) pushes x onto stack s, i.e. destructively changing s so as to have a new first (top) element x. Afterwards, pop!(s) produces x and pop!(s) produces the original s.

reduce: ((S, S) -> S, %) -> S

from Collection S

reduce: ((S, S) -> S, %, S) -> S

from Collection S

reduce: ((S, S) -> S, %, S, S) -> S if S has BasicType

from Collection S

remove: (S -> Boolean, %) -> %

from Collection S

remove: (S, %) -> % if S has BasicType

from Collection S

removeDuplicates: % -> % if S has BasicType

from Collection S

sample: %

from Aggregate

select: (S -> Boolean, %) -> %

from Collection S

size?: (%, NonNegativeInteger) -> Boolean

from Aggregate

top: % -> S

top(s) returns the top element x from s; s remains unchanged. Note: Use pop!(s) to obtain x and remove it from s.

Aggregate

BagAggregate S

BasicType if S has BasicType

CoercibleTo OutputForm if S has CoercibleTo OutputForm

Collection S

ConvertibleTo InputForm if S has ConvertibleTo InputForm

Evalable S if S has Evalable S and S has SetCategory

finiteAggregate

Hashable if S has Hashable

HomogeneousAggregate S

InnerEvalable(S, S) if S has Evalable S and S has SetCategory

SetCategory if S has SetCategory

shallowlyMutable