# program-as-data

A program is like an essay. The first version is a draft, and drafts demand editing. Program is also can be seen as data.

1. 直觉认识proc,提取body。
2. 对比识别。
3. 加壳。
4. 三行表格，n列迭代。

(value-of (proc (var body)) env)
= (value-of (proc-exp (procedure (var body env)) val) env)

= (value-of body ([var=val] env))

### Two similar functions

; Los -> Boolean
; does l contain "dog"
(define (contains-dog? l)
(cond
[(empty? l) #false]
[else
(or
(string=? (first l) "dog")
(contains-dog?
(rest l)))]))

; Los -> Boolean
; does l contain "cat"
(define (contains-cat? l)
(cond
[(empty? l) #false]
[else
(or
(string=? (first l) "cat")
(contains-cat?
(rest l)))]))

### 加壳

; String Los -> Boolean
; determines whether l contains the string s
(define (contains? s l)
(cond
[(empty? l) #false]
[else (or (string=? (first l) s)
(contains? s (rest l)))]))

; Los -> Boolean
; does l contain "dog"
(define (contains-dog? l)
(contains? "dog" l))

; Los -> Boolean
; does l contain "cat"
(define (contains-cat? l)
(contains? "cat" l))

 index 0 1 2 … M a+S a+1*W+S a+2*W+S … f at M f(a+S) f(a+1*W+S) f(a+2*W+S) … Area W*f(a+S) W*f(a+1*W+S) W*f(a+2*W+S) … residual 60.00% 50.00% 40.00% …

##### 令狐冲
###### Engineer of offshore wind turbine technique research

My research interests include distributed energy, wind turbine power generation technique , Computational fluid dynamic and programmable matter.