links for 2010-08-30

August 31, 2010
  • <blockquote>
    <p>
    Many education researchers believe that different people learn differently, and have tried to understand and classify different learning styles [3]. One of the categorized types was that of a Visual Learner, who prefers "pictures, diagrams, or flow charts" [4]. There is a building momentum for creating material (images, animations, interactive displays) for use in science and engineering education [5]. The goal of this project is to join this wave of educators and create compelling and informative visual imagery to facilitate teaching lower- and upper-division computer science.
    </p><p>
    Ketrina Yim is a rare find–a student with an extremely strong computer science record and a love of illustration with educational interests. On her own volition, she penned several "tutorial sheets" for her fellow students learning Scheme in CS61A (Figures 1 and 2).
    </p>
    </blockquote>
  • <pre>
    (define (accumulate op initial sequence)
    (if (null? sequence)
    initial
    (op (car sequence)
    (accumulate op initial (cdr sequence)))))
    (accumulate + 0 (list 1 2 3 4 5))
    15
    (accumulate * 1 (list 1 2 3 4 5))
    120
    (accumulate cons nil (list 1 2 3 4 5))
    (1 2 3 4 5)

    (define (enumerate-tree tree)
    (cond ((null? tree) nil)
    ((not (pair? tree)) (list tree))
    (else (append (enumerate-tree (car tree))
    (enumerate-tree (cdr tree))))))
    (enumerate-tree (list 1 (list 2 (list 3 4)) 5))
    (1 2 3 4 5)

    (define (sum-odd-squares tree)
    (accumulate +
    0
    (map square
    (filter odd?
    (enumerate-tree tree)))))
    </pre>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: