Scheme, given a recursive function how do I change it to tail recursive and streams
Given a recursive function in scheme how do I change that function to tail recursive, and then how would I implement it using streams? Are there patterns and rules that you follow when changing any function in this way?

Take this function as an example which creates a list of numbers from 2-m (this is not tail recursive?)

Code: 

    (define listupto
      (lambda (m)
        (if (= m 2)
            '(2)
            (append (listupto (- m 1)) (list m)))))
Scheme, given a recursive function how do I change it to tail recursive and streams
===

Given a recursive function in scheme how do I change that function to tail recursive, and then how would I implement it using streams? Are there patterns and rules that you follow when changing any function in this way?

Take this function as an example which creates a list of numbers from 2-m (this is not tail recursive?)

Code: 

    (define listupto
      (lambda (m)
        (if (= m 2)
            '(2)
            (append (listupto (- m 1)) (list m)))))