Skip to main content

Higher order functions extension functins

Project description

sequence_extensions

provides high order functions as extesions for the custom list class in python

l = list_ext([1, 2, 3, 4])

l.map(lambda x: x*2)
[2, 4, 6, 8]

l.filter(lambda x: x%2==0)
[2, 4]

l.for_each(lambda x: print(x))
1
2
3
4

l.first(lambda x: x%2==0)
2

l.last(lambda x: x%2==0)
4

l.to_strings()
["1", "2", "3", "4"]

l.to_string()
"1, 2, 3, 4"

for develompment install pip install -e .

to run tests pytest

To generate coverage pytest --cov --cov-report html

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

sequence-extensions-0.1.4.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sequence_extensions-0.1.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file sequence-extensions-0.1.4.tar.gz.

File metadata

  • Download URL: sequence-extensions-0.1.4.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for sequence-extensions-0.1.4.tar.gz
Algorithm Hash digest
SHA256 140d0413684845321c474f7df7bad6a0a0579bef6bb1f14ee3096dd3a2085d51
MD5 2cc5cd9767c1fd99fe202a4686bde86f
BLAKE2b-256 cc06052bf82db743ee8dc1ddd0f54f1a6426c03a28aaaf42c43f536fbfeaaa85

See more details on using hashes here.

File details

Details for the file sequence_extensions-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for sequence_extensions-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98c9aa4714c2a6d13e782b69975cde5a2bd15c66e2fbf947098c427ff6048f7b
MD5 fd399e9e4c955f7bd2312a5b3c321000
BLAKE2b-256 44b9221534846f29c01484f3a5e2fbc1db1ea8b9fadd6cf3a992e99dbe93c1fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page