Skip to main content

Lazy computing

Based on haskell features, exemples are worth a 1000 words

Usage

.. code:: python

from lazy_computing import *

.. code:: python

for x in infinity: print(x)                         # 1 2 3 4 5 ...

for x in remove(100, infinity): print(x)            # 100 101 102 103 ...

for x in take(5, remove(100, infinity)): print(x)   # 100 101 102 103 104

for x in arithm(1, 5, ...): print(x)                # 1 5 9 13 17 ...

for x in arithm(1, 5, ..., 17): print(x)            # 1 5 9 13

for x in geom(1, 5, ...): print(x)                  # 1 5 25 125 625 ...

for x in geom(1, 5, ..., 500): print(x)             # 1 5 25 125 625 ...

for x in tail([5, 6, 7, 8]): print(x)               # 6 7 8

print(head([5, 6, 7, 8]))                           # 5
print(extract(2, [5, 6, 7, 8]))                     # 7

Documentation

  • infinity: iterable representing the infinity
  • remove(number, iterable): return an iterator without the number first element
  • extract(index, iterable): return the value at index from iterable
  • take(limit, iterable): return an iterator taking limit first value from iterable
  • head(iterable): return the first value of an iterable
  • tail(iterable): return an iterator on an iterable, without the head
  • arithm(*args): return an iterable. It guess the step from the arguments
  • geom(*args): return an iterable: It guess the factor from the arguments

Metadata

Release files for lazy-computing 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lazy-computing 0.1
File Size Uploaded Provenance Actions
lazy_computing-0.1.tar.gz 2.3 kB Without provenance Details for lazy_computing-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lazy-computing 0.1
File Interpreter ABI Platform Actions
lazy_computing-0.1-py3-none-any.whl Python 3 none any Details for lazy_computing-0.1-py3-none-any.whl

Total release size: 16.9 kB

Release files / lazy_computing-0.1.tar.gz

Download URL lazy_computing-0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4c7d8f0d86f86f6c4ddd5f01ff32f272e87865f425aff0bc21b326b000afacff
BLAKE2b-256 checksum
How to use checksums
b8693198b1630690190a3da3cd3e346446905105cbaa515d4070b50cbb22ed78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

Release files / lazy_computing-0.1-py3-none-any.whl

Download URL lazy_computing-0.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f15831c9e53eed2015db1f065af0e8b310a6fa21e5dc7e177c09b43c480cbcf1
BLAKE2b-256 checksum
How to use checksums
82b2980873ca4919de6a01be0b9e9fb45ed48ee541dba08abb23d6f4bc3413b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

Security for lazy-computing 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page