Re: PIZZA time again :-)
Date: 2 Sep 2005 13:29:09 -0700
Message-ID: <1125692949.648111.121590_at_g14g2000cwa.googlegroups.com>
mAsterdam wrote:
> dawn wrote:
> >mAsterdam wrote:
> >>>>Assume
> >>>>1. there is a meaningful (or at least consequential)
> >>>>difference between:
> >>>>
> >>>> toppings([salami, mozarella, onions]).
> >>>> and
> >>>> toppings([mozarella, onions, salami]).
> [snip]
> >>Consider
> >>
> >> merge(ListOfLists, MergedList).
> >>
> >>Now
> >>
> >>merge ([[salami, mozarella, onions][mozarella, onions, salami]], M).
> >>
> >>should fail because salami is before mozarella in the first list,
> >>and after it in the second. It can't preserve the order.
> >
> > I don't know how you define a merge when there isn't
> > an ordering defined on the type.
> > Is there such a function? Your lists are ordered here,
> > but your domain/type is not, unless you choose something
> > like alpha order.
>
> That is another way of asking the same question.
> What should 'merge' do when the order is not
> in the values (as it would be if we took the
> ordering defined on the type) but just in
> their position, relative to other values.
> It is what I'm trying to find out.
Perhaps it should do the same thing as a sort on a set where no ordering has been defined - ?
>> > both lists and yields a pizza with salami on it twice (I think I'll
> > I can imagine an interleave function that alternates ingredients from
> > pass on it, however). --dawn
>
> So that is not the desired behaviour.
> The resulting pizza will be richer than the
> originals, but I would like to see one you
> would like to eat.
> >>Should
> >>
> >>merge([[salami, buttonmushroom, mozarella, onions][salami, artichoke,
> >>mozarella]], M).
> >>
> >>succeed with
> >> M = [salami, buttonmushroom, artichoke, mozarella, onions]
> >> M = [salami, artichoke, buttonmushroom, mozarella, onions]
> >>
> >>or just the first one (because of the order of the lists)?
Received on Fri Sep 02 2005 - 22:29:09 CEST