Demonstrates a more complicated nested list.
这个例子演示了如何创建一个比较复杂的列表嵌套。
If you merge the other way, you construct a nested list (see Listing 24).
如果以其他方式执行合并,则会构造一个嵌套式列表(参见清单24)。
In Example 3, the join is done inside the assembly in hierarchical fashion and creates immediately the desired nested list.
在Example3中,联接在程序集内以分层方式完成,且立即创建所需的嵌套列表。
Some of those will be basic (or atomic) activities and some will be complex activities, containing again a nested list of activities.
其中一些是基本(或原子)活动,而另一些是复杂活动。复杂活动又会包含一个嵌套的活动序列。
However, if the list is two-dimensional (that is, each element is itself a list), then you often want to "unpack" the contents of each nested list as it is iterated. You could do that like so.
不过,如果列表是二维的(即每个元素本身是一个列表),那么您通常想要在遍历时“解开”每个嵌套列表的内容。
Given a nested list of integers, implement an iterator to flatten it.
给定一个嵌套的整数列表,实现一个迭代器将其展开。
Given a nested list of integers, implement an iterator to flatten it.
给定一个嵌套的整数列表,实现一个迭代器将其展开。
应用推荐