[plt-scheme] match question
The bug server was down, but should be back up now.
Thanks,
sam th
On Tue, May 13, 2008 at 10:18 AM, praimon <praimon at gmail.com> wrote:
> hello,
> Unfortunately the bug reporting function isn't working for me
> (the "submitting bug report" message never completes).
> I'm guessing my firewall is blocking some needed port,
> or maybe it's something else.
>
> regards,
> praimon
>
>
>
> On Tue, May 13, 2008 at 8:22 AM, Sam TH <samth at ccs.neu.edu> wrote:
> > On Mon, May 12, 2008 at 11:34 PM, praimon <praimon at gmail.com> wrote:
> > > thanks for your response. Would you say that the greediness of
> > > the patterns produces counter-intuitive answers?
> > > Here's a very simple example:
> > >
> > > (match '(3 2 4 3 2 1)
> > > ((list x y ... x z ...) (append y z))
> > > => (2 4 3 2)
> > >
> > > Surely the result should be (2 4 2 1)? At least that's the intuitively
> > > correct answer (and the one returned by Mathematica, e.g.).
> > >
> > > Changing ... to ..1 produces a different counter-intuitive answer: (2 4 3 1).
> > > For people like me, who are merely using your language rather than trying
> > > to understand its inner workings, this is worrisome.
> >
> > Neither of those are the right answer. There seems to be something
> > wrong with non-linear patterns (patterns where a variable appears
> > multiple times, like `x' does here) combined with ... I'll take a
> > look at it.
> >
> > If you could file a bug report with that example (see the "Submit Bug
> > Report" entry under the Help menu) that would be great.
> >
> > Thanks,
> > --
> >
> >
> > sam th
> > samth at ccs.neu.edu
> >
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
--
sam th
samth at ccs.neu.edu