Talk:Greatest element of a list: Difference between revisions

Content added Content deleted
(Created page with ""Create a function that returns the maximum value in a provided set of values, '''where the number of values isn't known until runtime'''." Do ''any'' of these examples (other t...")
 
(They look fine)
Line 2: Line 2:


Do ''any'' of these examples (other than the Lua one) meet this criteria? It seems to me that almost all of them are using a list defined ''before'' runtime. --[[User:Stuart P. Bentley|STUART]] 17:50, 27 September 2011 (UTC)
Do ''any'' of these examples (other than the Lua one) meet this criteria? It seems to me that almost all of them are using a list defined ''before'' runtime. --[[User:Stuart P. Bentley|STUART]] 17:50, 27 September 2011 (UTC)
:Quickly skimming the solutions I'd say that the vast majority of the examples support lists where the values aren't known until runtime. It's just a lot easier to demonstrate using a hard-coded list. Pretty much any of the examples that have a function that takes a list (or array or whatever)--whether it's built-in or homemade--will be able to use a runtime list. They just don't because that takes lots of extra stuff like some other form of input besides hard-coding. --[[User:Mwn3d|Mwn3d]] 17:57, 27 September 2011 (UTC)