From: "trans. (T. Onoma)" Date: 2004-09-20T23:16:40+09:00 Subject: Re: Array#index block and rdetect On Monday 20 September 2004 09:52 am, Randy W. Sims wrote: > All enumerable objects don't neccessarilly have a meaningful concept of > an index. Eg. sets, multisets. Enumerable and Indexable are two > different things, though Indexable extends Enumerable. Main Entry: enu·mer·a·ble Pronunciation: i-'n(y)üm-r&-b&l, -'n(y)ü-m&- Function: adjective : DENUMERABLE Main Entry: de·nu·mer·a·ble Pronunciation: di-'n(y)ü-m&-r&-b&l Function: adjective : capable of being put into one-to-one correspondence with the positive integers So "index" must mean this corresponding integer. I would argue that sets and hashes are not technically enumerable, because they're elements can not be accessed as a _function_ of the index, i.e. one-to-one correspondence. Perhaps separate Collectable and Indexable modules would be preferable. T. -- ( o _ カラチ (a place in Paki) // trans. / \ transami@runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain