help-make
[Top][All Lists]
Advanced

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

Re: How to take union or intersection of two variables?


From: Sam Ravnborg
Subject: Re: How to take union or intersection of two variables?
Date: Thu, 31 Dec 2009 00:50:20 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Dec 31, 2009 at 02:17:53PM +1800, Peng Yu wrote:
> Suppose that I have the following two variables A and B. I want to
> compute the union and the intersection of them, which are 'a b c d'
> and 'b c' respectively.
> 
> A = a b c
> B = b c d

union = $(sort $(A) $(B))
intersection = $(filter $(A), $(B))

I did not test this but I think this works.

        Sam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]