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

This page is part of the web mail archives of SRFI 113 from before July 7th, 2015. The new archives for SRFI 113 contain all messages, not just those from before July 7th, 2015.

*To*: srfi-113@xxxxxxxxxxxxxxxxx*Subject*: checking set intersection*From*: Alex Shinn <alexshinn@xxxxxxxxx>*Date*: Fri, 20 Dec 2013 09:25:56 +0900*Delivered-to*: srfi-113@xxxxxxxxxxxxxxxxx*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=oTv7C+9lXQZ7v+yCORw7u1OmOlM20NSH4Pmeb483qIM=; b=NyPbH58Xb6dniVKCKlvgcl3fS1It+SyM+mPjdYqrmJOBaqa7NeaeqFI0v1Et+HqlTE /uYW5dN9UKV+vcloFZV+u4vBEpItz5uvKnRHpxwrgQnYfU1cM4GoZQpEjdgFGTT9e1lN oCKwKLgWmJ6+YJx+cCc7yNYQyhh8rtuMADhUUDhGMlrBH8KS0f9ATaFw5ZHyiiiRcl4N 5e6qT2ZFFZNB7aqfhIYqAq3CeEHsE8rLEssFa15RZfu1/Tj1RuCdo6EkmF4OoAMiwX4/ xyiO/DMZNa1PS1h5BE6+5OGQxc3Htn0o7RAUTnMsSRS3qeh3qwnMFyPhpDrfo0lVX250 Io0g==

I've had uses for testing whether two sets

intersect without needing the actual

intersection, so I think the following would

be useful:

(define (set-intersects? a b)

(positive? (set-size (set-intersection a b))))

though it could be implemented much

more efficiently.

I was originally going to write this as

(not (set-empty? ...))

but realized there was no such predicate.

We might want to include that as well.

--

Alex

**Follow-Ups**:**Re: checking set intersection***From:*Kevin Wortman

**Re: checking set intersection***From:*John Cowan

- Prev by Date:
**Re: Open issues for SRFI 113** - Next by Date:
**Re: checking set intersection** - Previous by thread:
**Re: enumeration set case syntax** - Next by thread:
**Re: checking set intersection** - Index(es):