fictive.patterns.sequences module¶
Common patterns for working with sequence objects
Functions
combine |
-
fictive.patterns.sequences.append_distinct(current: Sequence, new: Sequence)[source]¶ combine
currentand any values fromnewnot already incurrent>>> from fictive.patterns.sequences import append_distinct >>> current = (2, 4, 6, 8, 10) >>> new = [1, 2, 3, 4, 5] >>> append_distinct(current, new) (2, 4, 6, 8, 10, 1, 3, 5)
- Parameters
current (
collections.abc.Sequence) – the existing sequencenew (
collections.abc.Sequence) – the sequence of potential values to append
- Returns
the new sequecne
- Return type
the same type as
current