scamp_extensions.utilities.sequences.multi_option_function

scamp_extensions.utilities.sequences.multi_option_function(f)[source]

Decorator that allows the first argument of the function to be a list, tuple, or iterator, and in that case performs the function one each element individually, returning a list, tuple, or iterator.

Parameters:

f – the function, taking at least one argument

Returns:

a wrapped version that can take list, tuple, or iterator