[plt-scheme] Do no evil

From: wooks . (wookiz at hotmail.com)
Date: Mon Mar 8 10:31:46 EST 2010

> 
> Just a few quick notes:
> 
> - You can still use the design recipe. The induction / recursion is
> over the indices rather than directly over the elements. So your
> template looks something like:
> 
> (define (bubble-sort v i)
>   (cond
>     [(= i (vector-length v) ... finish recursion ...]
>     [else ... (vector-ref v i) ... (bubble-sort v (add1 i)) ...]))
> 
We will certainly do arrays with the DR but here we have a generative rather than structural recursion. Methinks that will be a bridge too far for my guys. 
> You could implement a
> immutable swap (i.e. a copy) to show the students the mutation is not
> fundamental.
> 

but
a) but would it further the objective of clarity b) is it relevant to their syllabusc) would they care? 

 		 	   		  
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100308/f75deef2/attachment.html>

Posted on the users mailing list.