SICP lec1b: # Computing process
来源:互联网 发布:打车软件补贴方案 编辑:程序博客网 时间:2024/05/16 11:06
Computing process
kinds of expressions
number
symbols
lambda
definations
conditionals
combinations
condition
if
(define (+ x u)
(if (= x 0)
y
(+ (-1 x) (1 y))
)
)
Fibonacci
(define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 1)) ) ))
tips: 1+ function means add args 1 and return
Hanoi Tower
(define (dohanoi n to from using) (if (> n 0) (begin (dohanoi (- n 1) using from to) (display "move ") (display from) (display " --> ") (display to) (newline) (dohanoi (- n 1) to using from) #t) #f))(define (hanoi n) (dohanoi n 3 1 2))
阅读全文
0 0
- SICP lec1b: # Computing process
- sicp
- SICP
- SICP学习笔2--循环与递归(iterative process and recursive process)
- Ubiquitous Computing / Pervasive Computing
- process
- process
- Process
- process
- process
- Process
- Process
- process
- Process
- process
- process
- Granular Computing
- Autonomic Computing
- 流程控制之if...elif...else和流程控制之while循环
- Oracle的数据文件
- 怎么设置eclipse中jdk版本
- 20171203 计算分数的浮点数值
- Handler机制解析
- SICP lec1b: # Computing process
- java实现的日历
- laravel基础一路由、控制器、视图
- Windows10和Ubuntu17.04双系统时间不同步
- 2种方法实现java对象的深拷贝
- web应用莫名其妙错误的解决办法:
- Win Api 有名管道通信--扫雷辅助(四)
- Linux 搭建数据库服务器(mysql)
- C++基础 多态与虚函数 2017_12_03