Scheme. Tail recursive ?

Posted by n00b on Stack Overflow See other posts from Stack Overflow or by n00b
Published on 2010-04-24T14:43:49Z Indexed on 2010/04/24 14:53 UTC
Read the original article Hit count: 384

Filed under:
|
|
|

Hi guys, any tail-recursive version for the below mentioned pseudocode ? Thanks !

(define (min list)
    (cond 
      ((null? list '())
      ((null? (cdr list)) (car list))
           (#t (let ((a (car list))
                     (b (min (cdr list)))
                     )
                 (if (< b a) b a)
                 )
               )
           )
      )

© Stack Overflow or respective owner

Related posts about Scheme

Related posts about tail