Talk:Apply a callback to an array: Difference between revisions

added a section header for the first topic to cause the TOC to be in the proper location.
(Specify the task!)
(added a section header for the first topic to cause the TOC to be in the proper location.)
 
(2 intermediate revisions by 2 users not shown)
Line 1:
==properly defining task==
The problem is, of course, that they're all doing slightly different things. To some extent this is unavoidable due to language differences, but when one example is mapping the results into another array and a different example decides to print them, that's just a bit sloppy. Though I certainly don't mind if you have secondary examples demonstrating different techniques or modifications to the basic premise (such as the c++ use of a binary function).
 
Line 33 ⟶ 34:
 
I removed the VB code because it doesn't work. Console.WriteLine doesn't return a value, and this cannot be used as an anonymous function.
 
== Problem Definition ==
 
Looking at the early history of this task, it seems that by "array" it is intended that "ordered sequence of values" be used and that "callback" means "run a bit of code" or maybe "apply a lambda term". Moreover, it's also clear that there is no need to update the sequence of values with the results of applying the lambda to each value. –[[User:Dkf|Donal Fellows]] 10:33, 4 January 2010 (UTC)