ChinaUnix.net
相关文章推荐:

scheme 解释器

就是传说中的阴阳迷题,我把代码改了一下,本质是一样的。 [code] (define (id x) x) (define (f x) (display "O") x) (define (g x) (display "-") x) ((f (call/cc id)) (g (call/cc id))) [/code] 这个程序的输出是什么? 把代码执行一下就知道了,问题是为什么有这样的输出? 这个问题有点难分析,我尽量把关键点讲清。但前提是你必须对 continuation 有充分的理解。 这个问题的难点不在 continuation,而在 continuati...

by win_hate - Functional编程 - 2008-09-10 10:36:19 阅读(9986) 回复(30)

相关讨论

本页收录 scheme 语言的相关资源。大家有好的资料请在论坛发布,我们会挑选一些并收录在这里。 [ 本帖最后由 win_hate 于 2008-9-8 19:06 编辑 ]

by win_hate - Functional编程 - 2008-09-05 12:18:17 阅读(15462) 回复(4)

原文链结 http://www.infoq.com/news/2009/08/scheme-Split-in-Two;jsessionid=07D949A4580ACA1530DE88AE67246C62 The scheme Steering Committee is proposing the split of the scheme language in two which temporarily are called Small scheme and Large scheme. scheme was invented in the ‘70s by Guy L. Steele and Gerald Jay Sussman as a dialect of Lisp, and has gone through several revisions. The IEEE 1178...

by win_hate - Functional编程 - 2009-08-24 11:51:40 阅读(3194) 回复(1)

本贴内容来自 《ML 程序设计语言》(Paulson) 的第 5 章:函数和无穷数据。 在惰性求值语言中如 Haskell 中,惰性是内建的,所以能轻易定义无穷数据。而在严格求值的语言中,要实现惰性求值,就要花费额外的工夫。SICP 第三章最后一节 Strem,讨论的就是这个问题。本贴给出几个在 ML 中实现无穷表的例子,可以与 SICP 对照着看一下:它们的手段是类似的。 [ 本帖最后由 win_hate 于 2008-11-7 16:03 编辑 ]

by win_hate - Functional编程 - 2008-11-10 23:58:49 阅读(3179) 回复(8)
by En_route - 其他UNIX - 2005-11-06 22:22:53 阅读(3618) 回复(0)

从北大数学院的链接上可以下载到 (http://http://www.math.pku.edu.cn/teachers/qiuzy/progtech/) 里面包含了MIT 开放课程 Structure and Interpretation of Computer Program 幻灯片(本地下载)。 MIT 开放课程 SICP 视频本地观看 等资源 [ 本帖最后由 heixia108 于 2008-11-22 10:01 编辑 ]

by heixia108 - Functional编程 - 2009-01-12 12:30:24 阅读(5381) 回复(3)

Sieve of Eratosthenes 算法描述见 http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes Haskell 实现如下: [code] sieve :: [Integer] -> [Integer] sieve (x:xs) = x : sieve xs' where xs' = filter (\y -> y `mod` x /= 0) xs primes = 2 : sieve [3,5..] [/code] 加了平方优化后的版本 [code] sieve :: [Integer] -> [Integer] sieve (x:xs) = x : sieve (xs' ++ xs''') where ...

by MMMIX - Functional编程 - 2009-05-21 10:29:42 阅读(13039) 回复(28)

http://lambda-the-ultimate.org/node/1840

by bleem1998 - Python - 2007-07-05 20:11:55 阅读(5229) 回复(2)

关于scheme的一个问题 真不好意思, 发在C++版,因为我认为C++版比较有可能有能解答的人,而且该版人气最旺 该问题来自这篇文章: http://www.cnblogs.com/linkcd/archive/2007/02/28/196087.html#659633 乐过以后,我想了一下 如下是我写的代码 (define (Foo op x y) (op x y)) (foo + (read) (read)) (foo (read) (read) (read)) 第二次执行foo函数时是会出错(编译Drscheme) 不能实现文章中想要的功能.请问为何? 初学,望大家包...

by ShellEx - C/C++ - 2007-02-28 19:18:44 阅读(1366) 回复(5)

小弟正在学《SICP》,主要是锻炼一下思维能力,学完了就差不多了解scheme了,正好java玩腻了,想换换口味,有没有要会scheme的:lol:

by gaoxt1983 - IT职业生涯 - 2006-10-08 14:41:36 阅读(915) 回复(1)