• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
this.Think();
(Define (Learn-SICP (Begin (Read Book) (Write Scheme) (Thinkabout It))))
博客园 首页 新随笔 联系 订阅 订阅 管理

随笔分类 -  Functional Programming

 
一个不错的scheme入门PPT
摘要:来自于:Greg J.BadrosUniversity of WashingtonCSE-341文件在这里 阅读全文
posted @ 2005-11-13 22:19 linkcd 阅读(2090) 评论(2) 推荐(0)
《4个程序员的一天》(续) 由idior的问题想到的
摘要:在《4个程序员的一天》一文中,idior问道: 不知道类似foo(+,-,+,*,/, a) //a is a array实现a[0]+a[1]+a[2]*a[3]/a[4]这种功能能实现吗?(用FP) 昨晚去看了看scheme的数据结构操作,得出以下解法:(;号后面是注释)(define (inner-runner 1st-number operators numbers) (if ... 阅读全文
posted @ 2005-07-21 19:43 linkcd 阅读(2904) 评论(9) 推荐(0)
回FantasySoft
摘要:FantasySoft兄的贴在这里hehe,其实我是偷懒没用那些复杂的函数来当op,直接把+传进去吧了。Scheme里面,数据和函数都是一回事,没有区别的。如果op是个复杂的函数,还是需要先吧这个函数定义出来,再传进去。比如现在我们op操作符不再是加法这么简单,而是要算x和y的平方和是多少,即:x^2 + y^2 = ?如何用scheme来做呢?首先我们的Foo的定义不用变,还是(define (... 阅读全文
posted @ 2005-07-20 19:03 linkcd 阅读(953) 评论(0) 推荐(0)
4个程序员的一天
摘要:【声明:本文没有贬低某个编程语言的意思】Please Note: 2005/10/14I found some friends republished this post and forget keep the original information, so please:1. Please don't forget keep the original address in your post.... 阅读全文
posted @ 2005-07-19 19:59 linkcd 阅读(24405) 评论(72) 推荐(2)
Solution for SICP
摘要:因为找不到SICP的辅导书, 有些要求explain的solution就不知道答案了, sigh...不知道直接去找MIT的教授要, 他们会不会给...1.1.7 Square Roots by Newton's Method(define (avg x y) (/ (+ x y) 2))(define (abs x) (if (< x 0) (- x) x))(defin... 阅读全文
posted @ 2005-04-30 14:15 linkcd 阅读(1949) 评论(2) 推荐(0)
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3