lisa.utils.mappable#

class lisa.utils.mappable(f)[source]#

Bases: object

Decorator that allows the decorated function to be mapped on an iterable:

@mappable
def f(x):
    return x * 2

f @ [1, 2, 3] == map(f, [1, 2, 3])

Methods

Methods#

mappable.__matmul__(other)[source]#