[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: Going mad with pattern matching

From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Re: Going mad with pattern matching
Date: Thu, 31 May 2007 13:33:57 +0200
User-agent: Thunderbird (X11/20070326)

Sorry Martin, I haven't followed this thread, but when you say "abused", does that have something to do with the use of default arguments?

      line(x: Float, m: Float == 1, b: Float == 0) : Float == m*x + b;
      x: Float := 3.2;
      print << line(x, 8.0) << newline;       -- 8.0 * x + 0
      print << line(x) << newline;            -- 1   * x + 0
      print << line(x, b == 5.0) << newline;  -- 1   * x + 5.0


On 05/29/2007 06:46 PM, Martin Rubey wrote:
"Bill Page" <address@hidden> writes:

Ok. Do you think we should generate an bug report for the use of the |
"suchthat" notation in patterns? Given that what you wrote works, I am more
confident that really this is intended to work using the | notation.

Yes, it certainly should work.  I do not know, unfortunately, how this kind of
definition works.  Note that there is another place where "==" is "abused",
namely for optional arguments.  I'm afraid that it's built into the parser.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]