A library of rust-styled monad utils for python.
Project description
Monad STD
monad_std
is a library that provides some useful Rust-styled utilities for using monads in Python.
Quick Start
To install this library, simply use your favorite package manager, here we use pure pip.
pip install monad-std
Then, import the library:
>>> from monad_std import *
>>> Ok(2)
Result::Ok(2)
Now you could use the utilities this library provides. For more information and examples, see the documentation above.
For a better guide, see the documentation's quick start guide.
Contribution
Any issue and pull request is welcomed, and you can directly make a pr for new features or open an issue for bug reports.
Future Plan
Until now, this library provides the following features:
monad_std.Option
: An optional value.monad_std.Result
: A structure containing a success value or an error.monad_std.Ok
: A successful value.monad_std.Err
: An error value.
monad_std.std_types
: Wrapped api around std types.monad_std.iter
: Iterator interface with functors and monads support.monad_std.Either
: A structure containing two type of values, but not that specific likemonad_std.Result
. (Currently under development.)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file monad_std-0.9.0.tar.gz
.
File metadata
- Download URL: monad_std-0.9.0.tar.gz
- Upload date:
- Size: 43.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 557e7148e467d672e3d5b1efd222dd6d6b31af560b5ba6508abfb11f9bf0b82f |
|
MD5 | c411d87dcd7f01ec7ccea25d1e44d9ed |
|
BLAKE2b-256 | 0dd20d29bcae999f08222e0161d69492f325c114fbebfb76ce06147ca9505dd7 |
Provenance
File details
Details for the file monad_std-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: monad_std-0.9.0-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c740d9aecb6a5a164606b20dfbb969f2148cea35b5c4e6c12d49ac695fc5fd44 |
|
MD5 | b6f56b4d27d26330a30012eb46f37a7c |
|
BLAKE2b-256 | 881a3935ee378e304a1f6889a768cf78741b8f088b7379cdc82527eeb1972188 |