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.
(added a section header for the first topic to cause the TOC to be in the proper location.)
 
(4 intermediate revisions by 4 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).
 
:I wrote up some [[Help:Common Issues|guidelines]], but I need to make them more visible. I'll probably add them to--or link to them from--the programming task template.--[[User:Short Circuit|Short Circuit]] 12:46, 23 January 2007 (EST)
 
::The problem is that the task is not properly defined. There is the same problem with most of the tasks in Rosetta Code. I don't understand why it is so difficult to write even a few sentences to describe what to be done. Writing the specifications is the most importand part of any sofware project!
::--[[User:PauliKL|PauliKL]] 17:42, 28 August 2008 (UTC)
 
== array vs list ==
Line 26 ⟶ 30:
:The task description needs to be changed. A lot of the code found here would be better placed in [[Loop Structures]]--but that task is currently being reconstructed by [[User:Marshmallows|Marshmallows]], so the task rewrite and review should probably wait until Marshmallows is done. At that point, though, this task should probably also be given a clearer name. I was thinking [[Apply a callback to members of a collection]]. But that might be too verbose. Thoughts? --[[User:Short Circuit|Short Circuit]] 23:30, 10 April 2008 (MDT)
As I understand it: A callback is characterized by passing executable code as an argument to other code. Anonymity is characterized by the absence of binding between a function and a name. --[[User:TBH|TBH]] 12:39, 18 January 2008 (MST)
 
== VB.NET ==
 
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)