Content deleted Content added
.NET languages are no longer considered strictly "procedural;" Select came out with C# 3.0 and VB 9, and in .NET, "functions" are referred to as "methods" |
|||
Line 13:
==Language comparison==
The map function is especially common in [[functional programming]] languages, but some [[high-level programming language|high-level]] [[procedural programming|procedural]] languages support it as well, and in others it may be defined. [[Common Lisp]] provides a whole family of map-like functions. The one that corresponds to the behavior described here is called <code>mapcar</code>, where the <code>-car</code> designation indicates access using the [[CAR and CDR|CAR operation]]. In [[C++]]'s [[Standard Template Library]], the map function is called <code>transform</code>. In C# (3.0), the map function is provided as an extension method called <code>Select</code>. It is also frequently used as an array operation in scripting languages such as [[Perl]], [[Python (programming language)|Python]] and [[Ruby (programming language)|Ruby]]; the operation is called <code>map</code> in Perl and Python and <code>collect</code> in Ruby (since it inherited the collect method from Smalltalk).
==Optimizations==
|