灯下 登录
计算机科学 / SICP / 4.3.3 Implementing the Amb Evaluator

Exercise 4.50 · 习题

Exercise 4.50: Implement a new special form

ramb that is like amb except that it searches alternatives in a

random order, rather than from left to right. Show how this can help with

Alyssa’s problem in Exercise 4.49.

练习 4.50:实现一种新的特殊形式 ramb,它与 amb 类似,但以随机顺序而非从左到右的顺序搜索各备选项。说明这如何有助于解决练习 4.49 中 Alyssa 遇到的问题。