Friendly sequences made in Python with :love:
Project description
Friendly Sequences
Inspired by Scala Sequence class [1] and iterchain [2], but with good typing support.
Examples
from friendly_sequences import Seq
assert (
Seq[int]((1, 2))
.zip(Seq[int]((3, 4)))
.flat_map(lambda x: x)
.filter(lambda x: x != 2)
.sort()
.map(str)
.fold(lambda left, right: f"{left}{right}", "")
) == "134"
[1] https://alvinalexander.com/scala/seq-class-methods-examples-syntax/ [2] https://github.com/Evelyn-H/iterchain
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
friendly_sequences-1.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for friendly_sequences-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbbca4016e3172d9ec9b66ade6f06f90dfa878fba08572f2c154564aa6811996 |
|
MD5 | 334d3fc080bf3cbcd4ba0fce5d4b64c2 |
|
BLAKE2b-256 | dc38721610fd41287859c107b778b3da24f9b17019c815ab1548a3fe867ade86 |