Write a Racket function named compare that takes two arguments, functions f and g, each of which takes a single integer argument.
compare returns a function of one argument, an integer n. The returned function computes the value f(n) > g(n). For example:
>(define double (lambda (n) (* n 2)))
>(define square (lambda (n) (* n n)))
>(define 2n+1 (lambda (n) (add 1 (double n)))
>((compare square double) 2) ; is (2*2) > (2*2)?
#f
>((compare square double) 5) ; is (5*5) > (5*2)?
#t
Here is what I have so far:
(define compare
(lambda (f g)
(lambda (int)
(lambda (int-two)
(>= (f g))))))