|
I was wondering if Mr. O'Donnell, you could go over this problem that I have been trying to solve. It is Problem #4 on the Autumn 99 Final. If you could give a brief explanation of the solution to this problem, that would be great. Also, I was wondering if you could comment briefly on the similarities between this problem and your idea of problem #4 on our final. Are they the same "type" of question?
Here is an attempt to define conditional in ML, using pattern-matching instead of a built in conditional function. Fun cond true x y = x | cond false x y = y ; Explain very briefly (one sentence) why the definition of cond above is not satisfactory. what is the difference between the two following forms? cond c (x y) (y z) and cond c x y z what sorts of values for x, y, z will make them the same vs. different?
|
lists? by dave, 2000, Dec 02
hd and tl have different types by Mike O'Donnell, 2000, Dec 02
It's the order of evaluation by Mike O'Donnell, 2000, Dec 02
Possible solution by Oliver Rothschild, 2000, Dec 03
Side-effects are not the crux of the matter; flow of control is by Mike O'Donnell, 2000, Dec 03
Try it out with the ML interpreter by Mike O'Donnell, 2000, Dec 03
my take by Andy Crowe, 2000, Dec 03
It's order of evaluation, not type by Mike O'Donnell, 2000, Dec 03
question: why cond definition is not satisfactory by Maggie Novak, 2000, Dec 03
User-defined cond is flawed, factoring application fixes flaw by Mike O'Donnell, 2000, Dec 03
to: