append
that takes two lists and
appends the second one at the end of the first one.
greener
which takes two colors and
returns the one whose greener component is larger, and
average
which takes two colors and returns a new color
whose components are the averages of the respective components of the
two colors.
list
given here, define a function that takes an
element and a list and returns true if the element appears in 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:
let rec find l x =
match l with
Empty -> ...
Finish the definition of the function.
Make sure to test your function on lists of
different types.