appendthat takes two lists and appends the second one at the end of the first one.
greenerwhich takes two colors and returns the one whose greener component is larger, and
averagewhich takes two colors and returns a new color whose components are the averages of the respective components of the two colors.
list, define a function that takes an element and a list and returns true if the element appears on the list and false otherwise. Note that when a function takes two arguments, but you want to do pattern-matching on one, you can use "match ... with" syntax. Here is the beginning of definition of the function:
Finish the definition of the function. Make sure to test your function on lists of different types.
let rec find l x = match l with Empty -> ...
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.