![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
scheme
iteye_7373
这个作者很懒,什么都没留下…
展开
-
[Scheme]循环读入并计算数字之和
一段guile脚本文件,循环读入并计算从stdin输入的两个数之和。 [code="shell"] #!/usr/local/bin/guile -s !# (define (main) (let ((a (read (current-input-port))) (b (read (current-input-port)))) (if (not (eof-ob...2013-09-23 16:52:36 · 262 阅读 · 0 评论 -
scheme或者guile尾递归算阶乘
一段guile脚本程序,基本就是打印一个hello world,然后算个阶乘。 [code="bash"] #!/usr/bin/guile \ -s !# (begin (newline) (display "hello world") (newline)) (define (factorial n) (fact-iter 1 1 n)) (...2013-02-08 22:03:01 · 230 阅读 · 0 评论