[plt-scheme] eliminate expensive toys: please critique the solution + access to website Solutions...

From: Terrence Brannon (metaperl at urth.org)
Date: Wed Feb 11 01:13:33 EST 2004

Having a background in logic programming, I solved this problem with an 
accumulator and an auxilliary function. I might've been able to do it 
with a named let, but I had problems following that part of the "Teach 
Yourself ... Fixnum ..." book.

(define (e-e-internal e-e-tmp thresh tl)
  (cond
    [(empty? tl) e-e-tmp]
    [(> (first tl) thresh) (e-e-internal e-e-tmp                  
                                         thresh (rest tl))]
    [else                  (e-e-internal (cons (first tl) e-e-tmp)
                                         thresh (rest tl))]
    ))

(define (e-e thresh tl)
  (e-e-internal empty thresh tl))

Also, how do I gain access to the solutions on the website? I am 
entering a program in Mathematics Teacher Education this summer (either 
Florida Atlantic/International University or Wnthrop University).




Posted on the users mailing list.