Skip to content

Commit

Permalink
feat: add to_tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Oct 26, 2023
1 parent 2547f4b commit efc452d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions FunctionalPython/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def count(self) -> int:
def to_list(self) -> list[_T0]:
return list(self._seq)

def to_tuple(self) -> tuple[_T0, ...]:
return tuple(self._seq)

def to_iter(self) -> Iterator[_T0]:
return iter(self._seq)

Expand Down

0 comments on commit efc452d

Please sign in to comment.