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

Method select

functional/pipeline.py:497–507  ·  view source on GitHub ↗

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

(self, func)

Source from the content-addressed store, hash-verified

495 return self._transform(transformations.map_t(func))
496
497 def select(self, func):
498 """
499 Selects f from the elements of the sequence.
500
501 >>> seq([1, 2, 3, 4]).select(lambda x: x * -1)
502 [-1, -2, -3, -4]
503
504 :param func: function to select with
505 :return: sequence with func mapped onto it
506 """
507 return self._transform(transformations.select_t(func))
508
509 def starmap(self, func):
510 """

Callers 1

test_selectMethod · 0.80

Calls 1

_transformMethod · 0.95

Tested by 1

test_selectMethod · 0.64