Jump to content

Talk:Search a list of records: Difference between revisions

Line 27:
Search also varies with evaluation strategy – if one element of a list is a function call, in some languages that call will be eagerly reduced/evaluated before the search equality function is applied. In others, such as JavaScript, an .indexOf search will '''not''' match a string like "epsilon" with a potentially equivalent function call like (function () {return "epsilon"})()
It might be helpful to specify requirements which drew these things out and made them visible. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 13:13, 10 October 2015 (UTC)
 
: A couple of concrete examples – I think the requirements should at least prompt, in the case of JavaScript ES6, the supply of a specific equality function by the coder, returning a value in the case of '''Array.prototype.find'''(''callback''), and an index in the case of '''Array.prototype.findIndex'''(''callback'').
:For JS ES5, it should prompt the use/demonstration of coder-specified equality functions through equivalent 'polyfills' [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 13:33, 10 October 2015 (UTC)
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.