| kind | = | "Sequence" |
The root mimic of all the sequences in the system.
Mimics
Inactive cells
Active cells
- %(inbetween)
- &(right)
- +(other)
- collected(...)
- consed(consSize 2)
- dropped(howManyToDrop)
- droppedWhile(...)
- each(...)
- filtered(...)
- grepped(...)
- indexed(from: 0, step: 1)
- infinity(from: 0, step: 1)
- interleave(right)
- interpose(inbetween)
- mapped(...)
- rejected(...)
- selected(...)
- sliced(sliceSize 2)
- zipped(+toZipAgainst)
- ω()
- ℕ()
Specs
Inactive cells (details)
Active cells (details)
nil
[ show source ]
macro(
argCount = call arguments length
cond(
argCount ==(
1),
chain = call arguments [](
0)
while(next?,
chain evaluateOn(call ground, next)
)
@,
argCount ==(
2),
argumentName = call arguments [](
0)
code = call arguments [](
1)
lexicalCode = LexicalBlock createFrom(list(argumentName, code), call ground)
while(next?,
lexicalCode call(next)
)
@,
argCount ==(
3),
indexArgumentName = call arguments [](
0)
argumentName = call arguments [](
1)
code = call arguments [](
2)
lexicalCode = LexicalBlock createFrom(list(indexArgumentName, argumentName, code), call ground)
index = 0
while(next?,
lexicalCode call(index, next)
++(index)
)
@
,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil
[ show source ]
macro(
argCount = call arguments length
cond(
argCount ==(
1),
toGrepAgainst = call argAt(
0)
Sequence Grep create(@, Ground, [], toGrepAgainst),
argCount ==(
3),
toGrepAgainst = call argAt(
0)
argName = call arguments [](
1)
theCode = call arguments [](
2)
Sequence Grep create(@, call ground, [](argName, theCode), toGrepAgainst)
,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
Returns a new sequence that starts from zero and steps forever
[ show source ]
method(from: 0, step: 1, fn(n, [](n +(step))) iterate(from) mapped(first))
Returns a new sequence of all the natural numbers
[ show source ]
method( fn(n, [](n +(1))) iterate(0) mapped(first))
Returns a new sequence of all the natural numbers
[ show source ]
method( fn(n, [](n +(1))) iterate(0) mapped(first))