Scheme Function

Job ID: 36428946

Budget: $30 – $250 USD

Write a function three in Scheme that takes a single parameter, a list of positive integers (duplicates are possible, zero is not considered a positive integer). The function three returns #t if the list includes three consecutive integers in an increasing order. The three consecutive numbers don’t have to be next to each other. Otherwise, it returns #f. The list is flat, i.e., it does not contain sublists. Assume that the list is not empty and it contains at least three integers.
Related categories: Algorithm Scheme