InfiniteTuple S¶
ituple.spad line 1 [edit on github]
S: Type
This package implements ‘infinite tuples’ for the interpreter. The representation is a stream.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- construct: % -> Stream S
construct(t)converts an infinite tuple to a stream.
- filterUntil: (S -> Boolean, %) -> %
filterUntil(p, t)returns[x for x in t while not p(x)].
- filterWhile: (S -> Boolean, %) -> %
filterWhile(p, t)returns[x for x in t while p(x)].
- map: (S -> S, %) -> %
map(f, t)replaces the tupletby[f(x) for x in t].
- select: (S -> Boolean, %) -> %
select(p, t)returns[x for x in t | p(x)].
- stream: (S -> S, S) -> %
stream(f, s)returns[s, f(s), f(f(s)), ...].