lazy
本頁內容尚未翻譯。
python.Lazy.names
Section titled “python.Lazy.names”def Lazy.names : List StringThe built-in generators, in the order of their continuations in the table.
python.Lazy.saved
Section titled “python.Lazy.saved”def Lazy.saved (name : String) : NatHow many locals the built-in generator name keeps.
python.Lazy.function
Section titled “python.Lazy.function”def Lazy.function (name : String) : ValueThe function value of the built-in generator name.
python.Lazy.at
Section titled “python.Lazy.at”def Lazy.at (k : Nat) : PlaceThe kept local at position k.
python.Lazy.appended
Section titled “python.Lazy.appended”def Lazy.appended (node : String) (items : Place) (value : Place) : CodeThe value in value appended to the list in items, at node.
python.Lazy.taken
Section titled “python.Lazy.taken”def Lazy.taken (node : String) (functions : List Function) (bodies : Nat -> Code) (iterator : Place) (item : Place) (ended : Place) (trying : Place) (scratch : Place) (rest : Flat) : FlatThe 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.
python.Lazy.called
Section titled “python.Lazy.called”def Lazy.called (node : String) (functions : List Function) (bodies : Nat -> Code) (f : Place) (items : Place) (result : Place) : CodeA 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.
python.Lazy.cleared
Section titled “python.Lazy.cleared”def Lazy.cleared (node : String) (items : Place) : CodeA new empty list into items, at node.
python.Lazy.gathered
Section titled “python.Lazy.gathered”def Lazy.gathered (node : String) (functions : List Function) (bodies : Nat -> Code) (iterators : Place) (items : Place) (first : Nat) : FlatThe 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.
python.Lazy.map
Section titled “python.Lazy.map”def Lazy.map (functions : List Function) (bodies : Nat -> Code) : Flatmap’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.
python.Lazy.filter
Section titled “python.Lazy.filter”def Lazy.filter (functions : List Function) (bodies : Nat -> Code) : Flatfilter’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.
python.Lazy.zip
Section titled “python.Lazy.zip”def Lazy.zip (functions : List Function) (bodies : Nat -> Code) : Flatzip’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.
python.Lazy.enumerate
Section titled “python.Lazy.enumerate”def Lazy.enumerate (functions : List Function) (bodies : Nat -> Code) : Flatenumerate’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.
python.Lazy.flat
Section titled “python.Lazy.flat”def Lazy.flat (name : String) (functions : List Function) (bodies : Nat -> Code) : FlatThe continuation of the built-in generator name, with the program’s functions and their bodies.
python.Lazy.functions
Section titled “python.Lazy.functions”def Lazy.functions : List FunctionThe built-in generators’ continuations as table entries (after the program’s functions).
python.Lazy.body
Section titled “python.Lazy.body”def Lazy.body (k : Nat) (functions : List Function) (bodies : Nat -> Code) : CodeThe body of the continuation of the built-in generator at position k among them, with the program’s functions
and their bodies.
python.Lazy.made
Section titled “python.Lazy.made”def Lazy.made (node : String) (name : String) (kept : Run -> List Value) (result : Place) : CodeThe built-in generator name made with kept as its first kept locals (the rest empty), into result, at
node.