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: Peng Yu
Subject: Re: How to take union or intersection of two variables?
Date: Thu, 31 Dec 2009 09:14:30 -0600

On Wed, Dec 30, 2009 at 5:50 PM, Sam Ravnborg <address@hidden> wrote:
> 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.

'union' works, but 'intersection' should be

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




reply via email to

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