< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
On Fri, May 11, 2007 at 04:55:14PM +0900, Enrique Comba Riepenhausen wrote:
> Do you want to remove the elements that are in the same position on
> the lists and are equal?
>
> If so I would say:
>
> require 'generator'
>
> list1 = [1,1,2,3,4,6] # => I included the 6 to show what I mean...
> list2 = [2,2,3,5,5,6] # => I included the 6 to show what I mean...
>
> def RemoveDupsFromLists ( list1 , list2 )
> lists = SyncEnumerator.new(list1, list2)
> lists.each { |element_list1, element_list2|
>
> if list1[element_list1] == list2[element_list2]
> list1.delete(element_list1)
> list2.delete(element_list2)
> end
> }
> end
Is it safe to delete from lists while you're enumerating through them?