Lisp tackles such mathematical problems easier. I am a little rusty but here is a simple solution.

```
; Consume a list of single digits, subtract 6 from each item, and filter out the negative values
(define (reduce-list list)
(cond
[(and (>= (- (first list) 6) 0) (empty? (rest list))) (- (first list) 6)]
[(>= (- (first list) 6) 0) (cons (- (first list) 6) (reduce-list (rest list)))]
[else (reduce-list (rest list))]))
; Go through the list and find if two successive numbers have the first number greater than the second one.
(define (compute list)
(cond
[(or (empty? (rest list)) (empty? (first list))) false]
[(> (first list) (first (rest list))) true]
[else (compute (rest list))]))
; Test it
(compute (reduce-list '(3 7 6 5)))
```

Slightly more complex, if you use higher order functions, solving it in a single expression is possible:

uses some generic higher order functions, definitions as follows:

foldr : (X Y -> Y) Y (listof X) -> Y

(foldr f base (list x-1 ... x-n)) = (f x-1 ... (f x-n base))

map : (X -> Y) (listof X) -> (listof Y)

to construct a list by applying f to each item on alox

that is, (map f (list x-1 ... x-n)) = (list (f x-1) ... (f x-n))

filter : (X -> boolean) (listof X) -> (listof X)

to construct a list from all those items on alox for which p holds

```
(define list '(3 7 6 5))
(foldr (lambda (a b) (cond [(> a b) true]
[(equal? b true) true]
[else a]))
10
(filter (lambda (a) (>= a 0)) (map (lambda (a) (- a 6)) list)))
```