Return-Path: X-Original-To: apmail-groovy-dev-archive@minotaur.apache.org Delivered-To: apmail-groovy-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB3ED18772 for ; Tue, 9 Jun 2015 17:21:28 +0000 (UTC) Received: (qmail 77173 invoked by uid 500); 9 Jun 2015 17:21:23 -0000 Delivered-To: apmail-groovy-dev-archive@groovy.apache.org Received: (qmail 77134 invoked by uid 500); 9 Jun 2015 17:21:23 -0000 Mailing-List: contact dev-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.incubator.apache.org Delivered-To: mailing list dev@groovy.incubator.apache.org Received: (qmail 77118 invoked by uid 99); 9 Jun 2015 17:21:23 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 17:21:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C39F5182224 for ; Tue, 9 Jun 2015 17:21:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id YWlwiOaXakUc for ; Tue, 9 Jun 2015 17:21:11 +0000 (UTC) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id F2A642030F for ; Tue, 9 Jun 2015 17:21:10 +0000 (UTC) Received: by yked142 with SMTP id d142so11371635yke.3 for ; Tue, 09 Jun 2015 10:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=s0uFQwtxpRQ0kSBfK/oNggpdrFaUOXn4rk76n85WthM=; b=v8zWb0Zll35kU5W7K+VL6iNAeH42ffWFSN1n7p/PSy1rRnqroivX6Vu/Zo6RiN6ksR 3GgdOTzvDDsk6GyR3Oohth5ebldcN/bgPsAjIw0pMiCUo7DV5GkwuYJhkfT67mcvkZh7 4nCNIycM91R5My8eGoBlcTk/bAFVfv1C3QAMudVfmC19ZCtu9OcEeV4nutZKxlXE9eht B/rq0U1DsrPhUFXasGSVOXdqEB8IZWw7mo0591lkVdyaLt0UUmK2riI+syCJgOYwSWzV PBHa0oVJBCQ99tYlxgFnIsNXviaQiB3z9PrcacDF69l2NpQMboM85gSAFbVJgUisJ0U9 kOUA== X-Received: by 10.170.136.150 with SMTP id d144mr26522624ykc.59.1433870419004; Tue, 09 Jun 2015 10:20:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.146.200 with HTTP; Tue, 9 Jun 2015 10:19:58 -0700 (PDT) In-Reply-To: References: From: Keegan Witt Date: Tue, 9 Jun 2015 13:19:58 -0400 Message-ID: Subject: Re: intersect() returns duplicate elements To: dev@groovy.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11397d2cfa967a051818f879 --001a11397d2cfa967a051818f879 Content-Type: text/plain; charset=UTF-8 I've not had trouble with intersect() myself. Under what circumstances did you observe the duplicates? Can you give an example? -Keegan On Tue, Jun 9, 2015 at 11:13 AM, Peter Ledbrook wrote: > Hi, > > While implementing and testing an intersect() method for CharSequence, I > noticed that Iterable.intersect() may return duplicate elements. Is that > intentional? It's not the behaviour I would expect. > > Thanks, > > Peter > --001a11397d2cfa967a051818f879 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've not had trouble with intersect() myself.=C2=A0 Under what circumstances did you o= bserve the duplicates?=C2=A0 Can you give an example?

-K= eegan

= On Tue, Jun 9, 2015 at 11:13 AM, Peter Ledbrook <peter@cacoethes.co.uk= > wrote:
H= i,

While implementing and testing an intersect() method = for CharSequence, I noticed that Iterable.intersect() may return duplicate = elements. Is that intentional? It's not the behaviour I would expect.

Thanks,

Peter

--001a11397d2cfa967a051818f879--