TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

ambit-0.9.1 -- a Gem for choose/fail (amb) non-deterministic programming

2 点作者 jimwise大约 14 年前

1 comment

wizard_2大约 14 年前
Looks like this is a direct port of pg's version. I have to admit, I haven't seen callcc before and the concept while similar to closures scares me a bit. Storing a complete environment in a variable is a new concept to wrap my head around.<p><pre><code> This is an all-ruby implementation of choose/fail nondeterministic programming with branch cut, as described in Chapter 22 of Paul Graham’s On Lisp[1], or Section 4.3 of SICP[2]. Due to Ruby containing a true call/cc, this is a much straighter port of Paul Graham’s scheme version of this code than his Common Lisp or my C versions are. :-)</code></pre>