On 27-Sep-1999, Bjorn Lisper <[EMAIL PROTECTED]> wrote:
> Nonstrict languages actually have the property that function definitions can
> be seen as equations.
In Haskell, that really only applies to functions which are defined with a
single equation, or with mutually exclusive patterns. If a function is
defined with multiple equations that have overlapping patterns, e.g.
f 0 = 42
f _ = 43
then you can't consider that as a set of equations, instead it is
actually an abbreviation for
f x = case x of
0 -> 42
_ -> 43
Consider the difference between that function and
f _ = 43
f 0 = 42
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
- Re: What is a functional language? Claus Reinke
- Re: What is a functional language? Adrian Hey
- Re: What is a functional language? Claus Reinke
- Re: What is a functional language? Francesco Logozzo
- Re: What is a functional language? Fred Hosch
- Re: What is a functional language? Adrian Hey
- Re: What is a functional language? Bjorn Lisper
- Re: What is a functional language? Fergus Henderson
- Re: What is a functional language? Fergus Henderson
- Re: What is a functional language? Torsten Grust
- Re: What is a functional language? Bjorn Lisper
- Re: What is a functional language? Bjorn Lisper
- Re: What is a functional language? Adrian Hey
- Re: What is a functional language? Adrian Hey
- Re: What is a functional language? Adrian Hey
