| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: More on lists and sets
vc wrote:
> Marshall Spight wrote:
> > vc wrote:
> > > paul c wrote:
> > >
> > > The usual list intersection opeartion (L = L1 intersect L2) is defined
> > > as
> > >
> > > L = [x | x <- L1, x in L2]
> >
> > You speak as if "list intersection" is a well-defined, well-understood
> > term with no significant disagreement.
>
> It's been so defined and understood starting at least with Lisp as well
> as in languages like Scheme, Haskell and ML.
I asked a Lisp programmer, and he said, no, that's not what means, and provided supporting common lisp documentation to show it having another meaning. I asked an SML programmer and he said it wasn't a term he was familiar with, but he would assume it meant the operation you described. I would have liked to have asked a Haskell programmer, but there are no working Haskell programmers in the USA (kidding) so I had to look it up in "Haskell: The Craft of Functional Programming" instead. No entries under "list intersection" and "intersection, list". So this does not appear to me to be a particularly universal definition. Perhaps I am misunderstanding you. Anyway, what is interesting to me is examining different collection algebras for different properties, rather than investigating what terms are popular or not.
> >This seems to me more like an imperative operator than a
> >functional one
>
> That's a trivial observation. Any declarative statement can be
> interpreted 'imperatively'.
Nonetheless, I find it instructive to consider imperative and
functional
operators distinctly. Regardless, on further reflection I have changed
my mind about this having an imperative feel to it, and withdraw
the objection.
But it's still not commutative. :-)
Marshall Received on Mon Mar 27 2006 - 21:32:48 CST
![]() |
![]() |