silver = [1, [3]] gold = [2, [4,5]] plat = chain([6, [7,8]]) = [6, [7,8]]
[1,2,3] [1, [2,3]]
Iterators Most forms of sequential data are implicity represented with an iterator. Iterators are a programming interface that are used in python to access the elements of various containers. ...
Generators A special form of an iterator that is returned from a generator function. The generator object iterates over all yielded values of a function. In the generator funtion, we ...
Interpreting Scheme There are two parts to an interpreter Eval: The eval evaluates primitive and combined expressions. It calls apply to apply a procedure to certain arguments in expr...
CS61A: Iterators
CS61A: Generators
A new version of content is available.