Sanjay Kulkarni has submitted a LISP function to perform a special function. Unlike most other tips you see here, this function is meant to be used as part of a larger routine. Sanjay's function requires two arguments: an integer and a list of integers in ascending order. When executed, it will return the smallest integer in the list that is larger than the first argument. For example, if you call this function with a first argument of 2 and this list (1 2 3 4 5), it will return the number 3. Sanjay does a great job of providing details of how the code works, and plenty of examples along with the code itself. |