Introduction to Computer Science/Help

From Wikiversity
Jump to navigation Jump to search

This is the help page for Introduction to Computer Science. Please feel free to post questions here. It is recommended that each new topic should be in its own section. A new topic may be started with a pair of double equal-sign characters like so:

== This is the title of my topic ==
My question goes here.

Please start new topics below this line.

Find the Max of the list of numbers using Dr. Scheme[edit]

Create a function that finds the maximum value of a given list-of-numbers. The contract for the function is shown below. Note that this function may require the creation and use of helper functions.

Test the function (=(max−of−list (cons 1 (cons 2 (cons 3 (cons 4 empty))))) 4) max−of−list : list−of−numbers −> number ( define (max−of−list a−list−of−numbers) ... )

The function should take the list of numbers and produce only the number value for the maximum.