pyfuncol package

Submodules

pyfuncol.dict module

pyfuncol.dict.contains(self: Dict[A, B], key: A) bool[source]

Tests whether this dict contains a binding for a key.

Parameters:

key – The key to find.

Returns:

True if the dict contains a binding for the key, False otherwise.

pyfuncol.dict.size(self: Dict[A, B]) int[source]

Computes the size of this dict.

Returns:

The size of the dict.

pyfuncol.dict.filter(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects all elements of this dict which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered dict.

pyfuncol.dict.filter_not(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects all elements of this dict which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered dict.

pyfuncol.dict.flat_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Dict[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function to all elements of this dict and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.foreach(self: Dict[A, B], f: Callable[[Tuple[A, B]], U]) None[source]

Apply f to each element for its side effects.

Parameters:

f – The function to apply to all elements for its side effects.

pyfuncol.dict.is_empty(self: Dict[A, B]) bool[source]

Tests whether the dict is empty.

Returns:

True if the dict is empty, False otherwise.

pyfuncol.dict.map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Tuple[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function to all elements of this dict.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.to_list(self: Dict[A, B]) List[Tuple[A, B]][source]

Converts this dict to a list of (key, value) pairs.

Returns:

A list of pairs corresponding to the entries of the dict

pyfuncol.dict.to_iterator(self: Dict[A, B]) Iterator[Tuple[A, B]][source]

Converts this dict to an iterator of (key, value) pairs.

Returns:

An iterator of pairs corresponding to the entries of the dict

pyfuncol.dict.count(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) int[source]

Counts the number of elements in the collection which satisfy a predicate.

Note: will not terminate for infinite-sized collections.

Parameters:

p – The predicate used to test elements.

Returns:

The number of elements satisfying the predicate p.

pyfuncol.dict.fold_left(self: Dict[A, B], z: B, op: Callable[[B, Tuple[A, B]], B]) B[source]

Applies a binary operator to a start value and all elements of this collection, going left to right.

Note: will not terminate for infinite-sized collections.

Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

Parameters:
  • z – The start value.

  • op – The binary operator.

Returns:

op(…op(z, x_1), x_2, …, x_n) where x1, …, xn are the elements of this collection. Returns z if this collection is empty.

Return type:

The result of inserting op between consecutive elements of this collection, going left to right with the start value z on the left

pyfuncol.dict.fold_right(self: Dict[A, B], z: B, op: Callable[[Tuple[A, B], B], B]) B[source]

Applies a binary operator to a start value and all elements of this collection, going right to left.

Note: will not terminate for infinite-sized collections.

Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

Parameters:
  • z – The start value.

  • op – The binary operator.

Returns:

op(x_1, op(x_2, … op(x_n, z)…)) where x1, …, xn are the elements of this collection. Returns z if this collection is empty.

Return type:

The result of inserting op between consecutive elements of this collection, going right to left with the start value z on the right

pyfuncol.dict.forall(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) bool[source]

Tests whether a predicate holds for all elements of this collection.

Note: may not terminate for infinite-sized collections.

Parameters:

p – The predicate used to test elements.

Returns:

True if this collection is empty or the given predicate p holds for all elements of this collection, otherwise False.

pyfuncol.dict.find(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Tuple[A, B] | None[source]

Finds the first element of the collection satisfying a predicate, if any.

Note: may not terminate for infinite-sized collections.

Note: might return different results for different runs, unless the underlying collection type is ordered.

Parameters:

p – The predicate used to test elements.

Returns:

An option value containing the first element in the collection that satisfies p, or None if none exists.

pyfuncol.dict.par_filter(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects in parallel all elements of this dict which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered dict.

pyfuncol.dict.par_filter_not(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects in parallel all elements of this dict which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered dict.

pyfuncol.dict.par_flat_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Dict[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function in parallel to all elements of this dict and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.par_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Tuple[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function in parallel to all elements of this dict.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.pure_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Tuple[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function to all elements of this dict using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.pure_flat_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Dict[C, D]]) Dict[C, D][source]

Builds a new dict by applying a function to all elements of this dict and using the elements of the resulting collections using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The function to apply to all elements.

Returns:

The new dict.

pyfuncol.dict.pure_filter(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects all elements of this dict which satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered dict.

pyfuncol.dict.pure_filter_not(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Dict[A, B][source]

Selects all elements of this dict which do not satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate not to satisfy.

Returns:

The filtered dict.

pyfuncol.dict.lazy_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Tuple[C, D]]) Iterator[Tuple[C, D]][source]

Builds a new list of tuples by applying a function to all elements of this dict, lazily.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy list of tuples, as an iterator.

pyfuncol.dict.lazy_flat_map(self: Dict[A, B], f: Callable[[Tuple[A, B]], Dict[C, D]]) Iterator[Tuple[C, D]][source]

Builds a new list of tuples by applying a function to all elements of this dict and using the elements of the resulting collections, lazily.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy list of tuples, as an iterator.

pyfuncol.dict.lazy_filter(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Iterator[Tuple[A, B]][source]

Selects all elements of this dict which satisfy a predicate, lazily.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered lazy list of tuples, as an iterator.

pyfuncol.dict.lazy_filter_not(self: Dict[A, B], p: Callable[[Tuple[A, B]], bool]) Iterator[Tuple[A, B]][source]

Selects all elements of this dict which do not satisfy a predicate, lazily.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered lazy list of tuples, as an iterator.

pyfuncol.list module

pyfuncol.list.map(self: List[A], f: Callable[[A], B]) List[B][source]

Builds a new list by applying a function to all elements of this list.

Parameters:

f – The function to apply to all elements.

Returns:

The new list.

pyfuncol.list.filter(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects all elements of this list which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered list.

pyfuncol.list.filter_not(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects all elements of this list which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered list.

pyfuncol.list.flat_map(self: List[A], f: Callable[[A], List[B]]) List[B][source]

Builds a new list by applying a function to all elements of this list and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new list.

pyfuncol.list.flatten(self: List[A]) List[B][source]

Converts this list of lists into a list formed by the elements of these lists.

Returns:

The flattened list.

pyfuncol.list.contains(self: List[A], elem: A) bool[source]

Tests whether this list contains a given value as element.

Parameters:

elem – The element to look for.

Returns:

True if the list contains the element, False otherwise.

pyfuncol.list.distinct(self: List[A]) List[A][source]

Selects all the elements of this list ignoring the duplicates.

Returns:

The list without duplicates.

pyfuncol.list.foreach(self: List[A], f: Callable[[A], U]) None[source]

Apply f to each element for its side effects.

Parameters:

f – The function to apply to all elements for its side effects.

pyfuncol.list.group_by(self: List[A], f: Callable[[A], K]) Dict[K, List[A]][source]

Partitions this list into a dict of lists according to some discriminator function.

Parameters:

f – The grouping function.

Returns:

A dictionary where elements are grouped according to the grouping function.

pyfuncol.list.is_empty(self: List[A]) bool[source]

Tests whether the list is empty.

Returns:

True if the list is empty, False otherwise.

pyfuncol.list.size(self: List[A]) int[source]

Computes the size of this list.

Returns:

The size of the list.

pyfuncol.list.find(self: List[A], p: Callable[[A], bool]) A | None[source]

Finds the first element of the list satisfying a predicate, if any.

Parameters:

p – The predicate to satisfy.

Returns:

The first element satisfying the predicate, otherwise None.

pyfuncol.list.index_of(self: List[A], elem: A) int[source]

Finds index of first occurrence of some value in this list. Returns -1 if none exists.

Parameters:

elem – The element whose index is to find.

Returns:

The index of the first occurrence of the element, or -1 if it does not exists.

pyfuncol.list.fold_left(self: List[A], z: B, op: Callable[[B, A], B]) B[source]

Applies a binary operator to a start value and all elements of this sequence, going left to right.

Parameters:
  • z – The start value.

  • op – The binary operation.

Returns:

op(…op(z, x_1), x_2, …, x_n) where x1, …, xn are the elements of this sequence. Returns z if this sequence is empty.

Return type:

The result of inserting op between consecutive elements of this sequence, going left to right with the start value z on the left

pyfuncol.list.fold_right(self: List[A], z: B, op: Callable[[A, B], B]) B[source]

Applies a binary operator to all elements of this list and a start value, going right to left.

Parameters:
  • z – The start value.

  • op – The binary operation.

Returns:

op(x_1, op(x_2, … op(x_n, z)…)) where x1, …, xn are the elements of this list. Returns z if this list is empty.

Return type:

The result of inserting op between consecutive elements of this list, going right to left with the start value z on the right

pyfuncol.list.forall(self: List[A], p: Callable[[A], bool]) bool[source]

Tests whether a predicate holds for all elements of this list.

Parameters:

p – The predicate used to test elements.

Returns:

True if this list is empty or the given predicate p holds for all elements of this list, otherwise False.

pyfuncol.list.head(self: List[A]) A[source]

Selects the first element of this iterable collection.

Note: might return different results for different runs, unless the underlying collection type is ordered.

Raises:

IndexError – If the iterable collection is empty.

pyfuncol.list.tail(self: List[A]) List[A][source]

The rest of the collection without its first element.

Raises:

IndexError – If the iterable collection is empty.

pyfuncol.list.take(self: List[A], n: int) List[A][source]

Selects the first n elements.

Parameters:

n – The number of elements to take from this list.

Returns:

A list consisting only of the first n elements of this list, or else the whole list, if it has less than n elements. If n is negative, returns an empty list.

pyfuncol.list.length(self: List[A]) int[source]

Returns the length (number of elements) of the list. size is an alias for length.

Returns:

The length of the list

pyfuncol.list.to_iterator(self: List[A]) Iterator[A][source]

Converts this list to an iterator.

Returns:

An iterator

pyfuncol.list.par_map(self: List[A], f: Callable[[A], B]) List[B][source]

Builds a new list by applying a function in parallel to all elements of this list.

Parameters:

f – The function to apply to all elements.

Returns:

The new list.

pyfuncol.list.par_filter(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects in parallel all elements of this list which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered list.

pyfuncol.list.par_filter_not(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects in parallel all elements of this list which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered list.

pyfuncol.list.par_flat_map(self: List[A], f: Callable[[A], List[B]]) List[B][source]

Builds a new list by applying a function in parallel to all elements of this list and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new list.

pyfuncol.list.pure_map(self: List[A], f: Callable[[A], B]) List[B][source]

Builds a new list by applying a function to all elements of this list using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The PURE function to apply to all elements.

Returns:

The new list.

pyfuncol.list.pure_flat_map(self: List[A], f: Callable[[A], List[B]]) List[B][source]

Builds a new list by applying a function to all elements of this list and using the elements of the resulting collections using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The function to apply to all elements.

Returns:

The new list.

pyfuncol.list.pure_filter(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects all elements of this list which satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered list.

pyfuncol.list.pure_filter_not(self: List[A], p: Callable[[A], bool]) List[A][source]

Selects all elements of this list which do not satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate not to satisfy.

Returns:

The filtered list.

pyfuncol.list.lazy_map(self: List[A], f: Callable[[A], B]) Iterator[B][source]

Builds a new list by applying a function to all elements of this list, lazily.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy list, as an iterator.

pyfuncol.list.lazy_filter(self: List[A], p: Callable[[A], bool]) Iterator[A][source]

Selects all elements of this list which satisfy a predicate, lazily.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered lazy list, as an iterator.

pyfuncol.list.lazy_filter_not(self: List[A], p: Callable[[A], bool]) Iterator[A][source]

Selects all elements of this list which do not satisfy a predicate, lazily.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered lazy list, as an iterator.

pyfuncol.list.lazy_flat_map(self: List[A], f: Callable[[A], List[B]]) Iterator[B][source]

Builds a new lazy list by applying a function to all elements of this list and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy list, as an iterator.

pyfuncol.list.lazy_flatten(self: List[A]) Iterator[B][source]

Converts this list of lists into a lazy list formed by the elements of these lists.

Returns:

The flattened lazy list, as an iterator.

pyfuncol.list.lazy_distinct(self: List[A]) Iterator[A][source]

Selects all the elements of this list ignoring the duplicates, lazily.

Returns:

The lazy list without duplicates, as an iterator.

pyfuncol.list.lazy_take(self: List[A], n: int) Iterator[A][source]

Selects the first n elements, lazily.

Parameters:

n – The number of elements to take from this list.

Returns:

A lazy list (as an iterator) consisting only of the first n elements of this list, or else the whole lazy list, if it has less than n elements. If n is negative, returns an empty lazy list.

pyfuncol.set module

pyfuncol.set.map(self: Set[A], f: Callable[[A], B]) Set[B][source]

Builds a new set by applying a function to all elements of this set.

Parameters:

f – The function to apply to all elements.

Returns:

The new set.

pyfuncol.set.filter(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects all elements of this set which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered set.

pyfuncol.set.filter_not(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects all elements of this set which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered set.

pyfuncol.set.flat_map(self: Set[A], f: Callable[[A], Set[B]]) Set[B][source]

Builds a new set by applying a function to all elements of this set and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new set.

pyfuncol.set.contains(self: Set[A], elem: A) bool[source]

Tests whether this set contains a given value as element.

Parameters:

elem – The element to look for.

Returns:

True if the set contains the element, False otherwise.

pyfuncol.set.foreach(self: Set[A], f: Callable[[A], U]) None[source]

Apply f to each element of the set for its side effects.

Parameters:

f – The function to apply to all elements for its side effects.

pyfuncol.set.group_by(self: Set[A], f: Callable[[A], K]) Dict[K, Set[A]][source]

Partitions this set into a dict of sets according to some discriminator function.

Parameters:

f – The grouping function.

Returns:

A dictionary where elements are grouped according to the grouping function.

pyfuncol.set.is_empty(self: Set[A]) bool[source]

Tests whether the set is empty.

Returns:

True if the set is empty, False otherwise.

pyfuncol.set.size(self: Set[A]) int[source]

Computes the size of this set.

Returns:

The size of the set.

pyfuncol.set.find(self: Set[A], p: Callable[[A], bool]) A | None[source]

Finds the first element of the set satisfying a predicate, if any.

Parameters:

p – The predicate to satisfy.

Returns:

The first element satisfying the predicate, otherwise None.

pyfuncol.set.fold_left(self: Set[A], z: B, op: Callable[[B, A], B]) B[source]

Applies a binary operator to a start value and all elements of this set, going left to right.

Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

Parameters:
  • z – The start value.

  • op – The binary operation.

Returns:

op(…op(z, x_1), x_2, …, x_n) where x1, …, xn are the elements of this set. Returns z if this set is empty.

Return type:

The result of inserting op between consecutive elements of this set, going left to right with the start value z on the left

pyfuncol.set.fold_right(self: Set[A], z: B, op: Callable[[A, B], B]) B[source]

Applies a binary operator to all elements of this set and a start value, going right to left.

Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

Parameters:
  • z – The start value.

  • op – The binary operation.

Returns:

op(x_1, op(x_2, … op(x_n, z)…)) where x1, …, xn are the elements of this set. Returns z if this set is empty.

Return type:

The result of inserting op between consecutive elements of this set, going right to left with the start value z on the right

pyfuncol.set.forall(self: Set[A], p: Callable[[A], bool]) bool[source]

Tests whether a predicate holds for all elements of this set.

Parameters:

p – The predicate used to test elements.

Returns:

True if this set is empty or the given predicate p holds for all elements of this set, otherwise False.

pyfuncol.set.length(self: Set[A]) int[source]

Returns the length (number of elements) of the set. size is an alias for length.

Returns:

The length of the set

pyfuncol.set.to_iterator(self: Set[A]) Iterator[A][source]

Converts this set to an iterator.

Returns:

An iterator

pyfuncol.set.par_map(self: Set[A], f: Callable[[A], B]) Set[B][source]

Builds a new set by applying in parallel a function to all elements of this set.

Parameters:

f – The function to apply to all elements.

Returns:

The new set.

pyfuncol.set.par_filter(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects in parallel all elements of this set which satisfy a predicate.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered set.

pyfuncol.set.par_filter_not(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects in parallel all elements of this set which do not satisfy a predicate.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered set.

pyfuncol.set.par_flat_map(self: Set[A], f: Callable[[A], Set[B]]) Set[B][source]

Builds a new set by applying in parallel a function to all elements of this set and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new set.

pyfuncol.set.pure_map(self: Set[A], f: Callable[[A], B]) Set[B][source]

Builds a new set by applying a function to all elements of this set using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The PURE function to apply to all elements.

Returns:

The new set.

pyfuncol.set.pure_flat_map(self: Set[A], f: Callable[[A], Set[B]]) Set[B][source]

Builds a new set by applying a function to all elements of this set and using the elements of the resulting collections using memoization to improve performance.

WARNING: f must be a PURE function i.e., calling f on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

f – The function to apply to all elements.

Returns:

The new set.

pyfuncol.set.pure_filter(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects all elements of this set which satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered set.

pyfuncol.set.pure_filter_not(self: Set[A], p: Callable[[A], bool]) Set[A][source]

Selects all elements of this set which do not satisfy a predicate using memoization to improve performance.

WARNING: p must be a PURE function i.e., calling p on the same input must always lead to the same result!

Type A must be hashable using hash() function.

Parameters:

p – The predicate not to satisfy.

Returns:

The filtered set.

pyfuncol.set.lazy_map(self: Set[A], f: Callable[[A], B]) Iterator[B][source]

Builds a new set by applying a function to all elements of this set, lazily.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy set, as an iterator.

pyfuncol.set.lazy_filter(self: Set[A], p: Callable[[A], bool]) Iterator[A][source]

Selects all elements of this set which satisfy a predicate, lazily.

Parameters:

p – The predicate to satisfy.

Returns:

The filtered lazy set, as an iterator.

pyfuncol.set.lazy_filter_not(self: Set[A], p: Callable[[A], bool]) Iterator[A][source]

Selects all elements of this set which do not satisfy a predicate, lazily.

Parameters:

p – The predicate to not satisfy.

Returns:

The filtered lazy set, as an iterator.

pyfuncol.set.lazy_flat_map(self: Set[A], f: Callable[[A], Set[B]]) Iterator[B][source]

Builds a new lazy set by applying a function to all elements of this set and using the elements of the resulting collections.

Parameters:

f – The function to apply to all elements.

Returns:

The new lazy set, as an iterator.

Module contents