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

Function order_by_t

functional/transformations.py:186–196  ·  view source on GitHub ↗

Transformation for Sequence.order_by :param func: order_by function :return: transformation

(func)

Source from the content-addressed store, hash-verified

184
185
186def order_by_t(func):
187 """
188 Transformation for Sequence.order_by
189 :param func: order_by function
190 :return: transformation
191 """
192 return Transformation(
193 "order_by({0})".format(name(func)),
194 lambda sequence: sorted(sequence, key=func),
195 None,
196 )
197
198
199def drop_right_t(n):

Callers

nothing calls this directly

Calls 1

nameFunction · 0.85

Tested by

no test coverage detected