; reverse : list-of-alpha -> list-of-alpha ; Purpose: Returns the reverse of the given list. (define (reverse aloa) (local [; reverse-acc : list-of-alpha list-of-alpha -> list-of-alpha ; Purpose: Returns the list formed by the reversed elements of aloa ; followed by the elements in aloa-rev. (define (reverse-acc aloa aloa-rev) (cond [(empty? aloa) aloa-rev] [(cons? aloa) (reverse-acc (rest aloa) (cons (first aloa) aloa-rev))]))] (reverse-acc aloa empty)))