MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / map

Method map

functional/pipeline.py:485–495  ·  view source on GitHub ↗

Maps f onto the elements of the sequence. >>> seq([1, 2, 3, 4]).map(lambda x: x * -1) [-1, -2, -3, -4] :param func: function to map with :return: sequence with func mapped onto it

(self, func)

Source from the content-addressed store, hash-verified

483 return self._transform(transformations.symmetric_difference_t(other))
484
485 def map(self, func):
486 """
487 Maps f onto the elements of the sequence.
488
489 >>> seq([1, 2, 3, 4]).map(lambda x: x * -1)
490 [-1, -2, -3, -4]
491
492 :param func: function to map with
493 :return: sequence with func mapped onto it
494 """
495 return self._transform(transformations.map_t(func))
496
497 def select(self, func):
498 """

Callers 15

productMethod · 0.95
sumMethod · 0.95
averageMethod · 0.95
to_jsonlMethod · 0.95
jsonlMethod · 0.80
test_to_sqlite3_dictMethod · 0.80
test_eqMethod · 0.80
test_getitemMethod · 0.80
test_containsMethod · 0.80
test_addMethod · 0.80
test_headMethod · 0.80

Calls 1

_transformMethod · 0.95

Tested by 15

test_to_sqlite3_dictMethod · 0.64
test_eqMethod · 0.64
test_getitemMethod · 0.64
test_containsMethod · 0.64
test_addMethod · 0.64
test_headMethod · 0.64
test_firstMethod · 0.64
test_head_optionMethod · 0.64
test_lastMethod · 0.64
test_last_optionMethod · 0.64
test_initMethod · 0.64