
On Wed, 2010-04-14 at 12:16 -0700, Ashley Yakeley wrote:
On Wed, Apr 14, 2010 at 02:07:52AM -0700, Ashley Yakeley wrote:
So the facts that (1) f == g (2) f undefined = 6 (3) g undefined = undefined is not a problem?
This is not a problem. f and g represent the same moral function,
On 2010-04-14 11:12, John Meacham wrote: they
are just implemented differently. f is smart enough to know that its argument doesn't matter, so it doesn't need to evaluate it. g waits forever trying to evaluate its function, not knowing it doesn't need it.
Hence they are distinct functions,
They are distinct Haskell functions, but they represent the same moral function.
Are f 0 = 1 f n = f (n - 1) + f (n - 2) and g 0 = 1 g n | n > 0 = g (n - 1) + g (n - 2) | n < 0 = g (n + 2) - g (n + 1) The same (morally) function? Are: f x = 2*x and f x = undefined The same function