help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Lists composed of equal number and kind of elements


From: Pascal J. Bourguignon
Subject: Re: Lists composed of equal number and kind of elements
Date: Tue, 28 Jul 2015 23:34:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> Drew Adams <drew.adams@oracle.com> writes:
>
>> All you need to test is (cl-set-exclusive-or list-1
>> list-2).
>>
>> (a a a b b), (b b a), and (b a) all represent the
>> same set.
>>
>> IOW, neither order nor duplication matters.
>
> The OP didn't say anything about sets - I said that.
> The OP said he wanted equality with respect to the
> same items being there (order not important) and the
> lists having the same length.

No, didn't say same items.  
Said same number and same kind.
What is the kind of an item? Didn't say.

Therefore my solution is parameterised by a kind function.
Since we don't know what the kind of an item is, it is also
parameterised by an equality test for those kinds.


-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

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