lists:keymerge/3

David Hopwood <>
Wed Nov 3 00:41:39 CET 2004


Bengt Kleberg wrote:
> Vance Shipley wrote:
> 
>> On Tue, Nov 02, 2004 at 10:41:20AM +0100, Bengt Kleberg wrote:
>> }  }  this seems to be according to the documentation:
>> }  ''When elements in the input lists compare equal, elements from 
>> List1 }  are picked before elements from List2.''
>>   The only logical interpretation of that statement is that elements
>> with the same key are picked from List1.  If you interpret it that the 
>> whole tuple must be equal for this statement to apply then it would be 
>> impossible to prove which list was chosen.
> 
> i interpreted it as meaning that _both_ elements are taken. the one from 
> list1 first, the one from list2 after.
> 
> note: i am not a native english speaker.

"are picked before" is ambiguous in English. It could either mean
"are picked in preference to" or "are placed earlier than". Without
testing it I would have assumed the former. The documentation should
be changed to say more precisely what was intended.

-- 
David Hopwood <>




More information about the erlang-questions mailing list