In the remainder of the article, we will show how to implement our simplistic mock object scheme, exploiting a set of libraries and components that greatly reduce the work required.
在本文的其余部分中,我们将介绍如何实现简单的模拟对象方案,其中利用一组库和组件大大减少了所需的工作。
Listing 4 presents the Scheme functions, which implement the same behavior, but the first with an argument and the second with a static variable.
清单4展示了Scheme函数,这些函数实现相同的行为,但是第一个函数有一个参数,第二个函数有一个静态值。
Scheme implementations are required to implement the optimization and many other functional language implementations do so, too.
Scheme实现必需要实现这种优化,很多其他函数式语言实现也必须要实现。
应用推荐