PDA

View Full Version : Help with SML function


smlnoob
06-06-2008, 12:30 AM
Construct a function which takes as input two input functions
f:real->real and g:real->real, and outputs three functions. The first function, call
it f’, will be such that f’(x) = f(x) for all inputs x. The second function g’(x), will
likewise satisfy g’(x) = g(x). The third function log:unit -> string will output a
string of f and g characters representing a log of the calls to f’ and g’. The ith letter of
the string should represent the function called on the ith application of f’ and g’. What
is output of log after evaluating the expression f’(f’(3)) + g’(f’(g’(3) + f’(4)))?


Please help me!!! I'm lost. I dont understand how to have a function produce several functions or how I can create the log function. PLEASE HELP!!!!!!!!!!!!


<3333333