[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] indexOf behavior
Hi Andrea,
On May 9, 2009, at 2:17 PM, Andrea Valle wrote:
y = [ [\the, \symbol], \collection, \contains, \my, \symbol ];
y.indexOf([\the, \symbol]);
Returns nil.
Shouldn't it return 0?
.indexOf tests for identity, not equality. Try .indexOfEqual:
y = [ [\the, \symbol], \collection, \contains, \my, \symbol ];
y.indexOfEqual([\the, \symbol]);
Cheers,
Sergio
--
Sergio Luque
www.sergioluque.com
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/