A written argument naturally includes explanation,information, but this material serves the purpose of convincing your reader of your point of view, which will be expressed in your thesis -the conclusion of your argument- and supported by premises

May 31, 2016, 11:49 p.m.

Recursion in Scheme

By Maurice Ticas

As promised from the "Update" Febuary 6th post, we can now recur to produce the total number of triangles inside the \(n^{th}\) iteration of the Sierpinski triangle using the code below written in Scheme.

(define sierpinski
  (lambda (n)
     ((zero? n) 1)
      (else (+ 1 (* 3 (sierpinski(- n 1))))))))

To do the recursion on your computer, install mit-scheme, then copy and paste the code to your mit-scheme implementation. You then will be able to call the function for any desirable \(n\). Now go ahead and recur!


There are 0 comments. No more than five will be allowed.