跳到內容

lazy

本頁內容尚未翻譯。

def Lazy.names : List String

The built-in generators, in the order of their continuations in the table.

def Lazy.saved (name : String) : Nat

How many locals the built-in generator name keeps.

def Lazy.function (name : String) : Value

The function value of the built-in generator name.

def Lazy.at (k : Nat) : Place

The kept local at position k.

def Lazy.appended (node : String) (items : Place) (value : Place) : Code

The value in value appended to the list in items, at node.

def Lazy.taken (node : String) (functions : List Function) (bodies : Nat -> Code) (iterator : Place) (item : Place) (ended : Place) (trying : Place) (scratch : Place) (rest : Flat) : Flat

The next item of iterator into item as for takes it, then the generator ends when there is none (else rest), at node with the program’s functions and their bodies; ended is the end flag, trying the flag place of the try around a user’s __next__, scratch the place for the test.

def Lazy.called (node : String) (functions : List Function) (bodies : Nat -> Code) (f : Place) (items : Place) (result : Place) : Code

A call of the function in f with the items of the list in items, into result, at node with the program’s functions and their bodies.

def Lazy.cleared (node : String) (items : Place) : Code

A new empty list into items, at node.

def Lazy.gathered (node : String) (functions : List Function) (bodies : Nat -> Code) (iterators : Place) (items : Place) (first : Nat) : Flat

The next item of each iterator in the tuple in iterators, appended to the list in items; the generator ends when one has none. At node with the program’s functions and their bodies; the loop’s own locals are the kept locals from position first.

def Lazy.map (functions : List Function) (bodies : Nat -> Code) : Flat

map’s continuation: forever, the next item of each iterator (ending when one has none), the function called with them, the result yielded; with the program’s functions and their bodies.

def Lazy.filter (functions : List Function) (bodies : Nat -> Code) : Flat

filter’s continuation: forever, the next item (ending when there is none), yielded when it is true (the function None) or the function’s result for it is; with the program’s functions and their bodies.

def Lazy.zip (functions : List Function) (bodies : Nat -> Code) : Flat

zip’s continuation: forever, the next item of each iterator (ending when one has none), yielded as a tuple; with the program’s functions and their bodies.

def Lazy.enumerate (functions : List Function) (bodies : Nat -> Code) : Flat

enumerate’s continuation: forever, the next item (ending when there is none), yielded with the count, which goes up by one; with the program’s functions and their bodies.

def Lazy.flat (name : String) (functions : List Function) (bodies : Nat -> Code) : Flat

The continuation of the built-in generator name, with the program’s functions and their bodies.

def Lazy.functions : List Function

The built-in generators’ continuations as table entries (after the program’s functions).

def Lazy.body (k : Nat) (functions : List Function) (bodies : Nat -> Code) : Code

The body of the continuation of the built-in generator at position k among them, with the program’s functions and their bodies.

def Lazy.made (node : String) (name : String) (kept : Run -> List Value) (result : Place) : Code

The built-in generator name made with kept as its first kept locals (the rest empty), into result, at node.