Scheme (programming language): Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
Line 152:
;; => (1 4 9 16)
 
We can define both of these trail tail-recursively as follows. The ''named'' <code>let</code> statement and the <code>do</code> statement are syntactic sugar which simpify tail -recursive definitions. To use factorial and map again to illustrate both forms:
 
(define (factorial n)