So when I got to Maker Day at Maker Faire yesterday afternoon, I was happy to find that Limor Fried, the founder of Adafruit, was giving a presentation on how to start your own business selling kits. This is a growing business right now, as people look for reasons to teach their kids how to solder, or just want to build a neat device. (Adafruit teamed with the Maker Store to offer the infamous TV-B-Gone kit that garnered a lot of attention at CES this year.)
michael@ubuntu:/host/Documents and Settings/Michael/My Documents/Downloads/android-sdk-linux_x86-1.5_r2/tools$ ./android create avd -t 2 -n android15 Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no] Created AVD 'android15' based on Android 1.5 michael@ubuntu:/host/Documents and Settings/Michael/My Documents/Downloads/android-sdk-linux_x86-1.5_r2/tools$ ./emulator -avd android15
(defun eval. (e a)
(cond
((atom e) (assoc. e a))
((atom (car e))
(cond
((eq (car e) 'quote) (cadr e))
((eq (car e) 'atom) (atom (eval. (cadr e) a)))
((eq (car e) 'eq) (eq (eval. (cadr e) a)
(eval. (caddr e) a)))
((eq (car e) 'car) (car (eval. (cadr e) a)))
((eq (car e) 'cdr) (cdr (eval. (cadr e) a)))
((eq (car e) 'cons) (cons (eval. (cadr e) a)
(eval. (caddr e) a)))
((eq (car e) 'cond) (evcon. (cdr e) a))
('t (eval. (cons (assoc. (car e) a)
(cdr e))
a))))
((eq (caar e) 'label)
(eval. (cons (caddar e) (cdr e))
(cons (list (cadar e) (car e)) a)))
((eq (caar e) 'lambda)
(eval. (caddar e)
(append. (pair. (cadar e) (evlis. (cdr e) a))
a)))))
(define (eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if? exp) (eval-if exp env))
((lambda? exp)
(make-procedure (lambda-parameters exp)
(lambda-body exp)
env))
((begin? exp)
(eval-sequence (begin-actions exp) env))
((cond? exp) (eval (cond->if exp) env))
((application? exp)
(apply (eval (operator exp) env)
(list-of-values (operands exp) env)))
(else
(error "Unknown expression type -- EVAL" exp))))
We want to write a function that generates accumulators-- a function that takes a number n, and returns a function that takes another number i and returns n incremented by i.