teaching machines

CS 330 Lecture 31 – Hi, Scheme

April 20, 2012 by . Filed under cs330, lectures, spring 2012.

Agenda

TODO

Program This

Choose one or both:

Code

stuff.scm

(define calc-tax
  (lambda (price) (* 1.055 price)))

(calc-tax 3.69)
;; ((lambda (price) (* 1.055 price)) 3.69)

(define !
  (lambda (n) 
    (cond
      ((= n 0) 1)
      (else (* n (! (- n 1)))))))

(define merge
  (lambda (a b)
    (cond
      ((null? a) b)
      ((null? b) a)
      (...))))