Are list-comprehensions and functional functions faster than “for loops”??

In terms of performance in Python, is a list-comprehension, or functions like map(), filter() and reduce() faster th...

SML map function?

I have the function: map(map(fn x =>[x])) [[],[1],[2,3,4]]; Which produces: val it = [[],[[1]],[[2],[3],[4]]]...

Mapping over values in a python dictionary?

Given a dictionary { k1: v1, k2: v2 ... } I want to get { k1: f(v1), k2: f(v2) ... } provided I pass a function f. ...

Using map in Haskell?

I want to use map to substract the average of a list from each element of a list using map. So far I got this functi...

Getting a map() to return a list in Python 3.x?

I'm trying to map a list into hex, and then use the list elsewhere. In python 2.6, this was easy: A: Python 2.6: &...

Java: is there a map function??

I need a map function. Is there something like this in Java already? (For those who wonder: I of course know how to...

STL name for the “map” functional programming function?

I would like to be able to write something like char f(char); vector<char> bar; vector<char> foo = map(...