Python :
>>> [2] * 3
[2, 2, 2]
int.
, , - - map .
>>> list(map(lambda x: x * 2, [2, 2]))
[4, 4]
>>> [x * 2 for x in [2, 2]]
[4, 4]
, .
(x * 2 for x in [2, 2])
Haskellish ( ):
>>> import operator
>>> from functools import partial, reduce
>>> add = partial(operator.mul, 2)
>>> list(map(add, [2,2]))
[4, 4]